1 2 #ifndef _MIDI_SYNTH_FILE_H 3 #define _MIDI_SYNTH_FILE_H 4 5 #include <BeBuild.h> 6 #include <MidiSynth.h> 7 #include <Entry.h> 8 9 typedef void (*synth_file_hook)(int32 arg); 10 11 class BMidiStore; 12 13 class BMidiSynthFile : public BMidiSynth { 14 public: 15 16 BMidiSynthFile(); 17 ~BMidiSynthFile(); 18 19 status_t LoadFile(const entry_ref* midi_entry_ref); 20 void UnloadFile(void); 21 22 virtual status_t Start(void); 23 virtual void Stop(void); 24 25 void Fade(void); 26 void Pause(void); 27 void Resume(void); 28 29 int32 Duration(void) const; 30 int32 Position(int32 ticks) const; 31 int32 Seek(); 32 33 status_t GetPatches(int16* pArray768, int16* pReturnedCount) const; 34 35 void SetFileHook(synth_file_hook pSongHook, int32 arg); 36 37 bool IsFinished(void) const; 38 39 void ScaleTempoBy(double tempoFactor); 40 void SetTempo(int32 newTempoBPM); 41 int32 Tempo(void) const; 42 43 void EnableLooping(bool loop); 44 45 void MuteTrack(int16 track, bool do_mute); 46 void GetMuteMap(char* pTracks) const; 47 48 void SoloTrack(int16 track, bool do_solo); 49 void GetSoloMap(char* pTracks) const; 50 51 private: 52 53 friend class BSynth; 54 55 virtual void _ReservedMidiSynthFile1(); 56 virtual void _ReservedMidiSynthFile2(); 57 virtual void _ReservedMidiSynthFile3(); 58 59 BMidiStore* fStore; 60 61 int32 _reserved[3]; 62 }; 63 64 #endif // _MIDI_SYNTH_FILE 65