vfs: check userland buffers before reading them.
[haiku.git] / headers / os / midi / MidiSynthFile.h
blob7964b0872c3cb55e651a3a239802ed129fa2f163
2 #ifndef _MIDI_SYNTH_FILE_H
3 #define _MIDI_SYNTH_FILE_H
5 #include <BeBuild.h>
6 #include <MidiSynth.h>
7 #include <Entry.h>
9 typedef void (*synth_file_hook)(int32 arg);
11 class BMidiStore;
13 class BMidiSynthFile : public BMidiSynth {
14 public:
16 BMidiSynthFile();
17 ~BMidiSynthFile();
19 status_t LoadFile(const entry_ref* midi_entry_ref);
20 void UnloadFile(void);
22 virtual status_t Start(void);
23 virtual void Stop(void);
25 void Fade(void);
26 void Pause(void);
27 void Resume(void);
29 int32 Duration(void) const;
30 int32 Position(int32 ticks) const;
31 int32 Seek();
33 status_t GetPatches(int16* pArray768, int16* pReturnedCount) const;
35 void SetFileHook(synth_file_hook pSongHook, int32 arg);
37 bool IsFinished(void) const;
39 void ScaleTempoBy(double tempoFactor);
40 void SetTempo(int32 newTempoBPM);
41 int32 Tempo(void) const;
43 void EnableLooping(bool loop);
45 void MuteTrack(int16 track, bool do_mute);
46 void GetMuteMap(char* pTracks) const;
48 void SoloTrack(int16 track, bool do_solo);
49 void GetSoloMap(char* pTracks) const;
51 private:
53 friend class BSynth;
55 virtual void _ReservedMidiSynthFile1();
56 virtual void _ReservedMidiSynthFile2();
57 virtual void _ReservedMidiSynthFile3();
59 BMidiStore* fStore;
61 int32 _reserved[3];
64 #endif // _MIDI_SYNTH_FILE