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