2002-10-26 22:51:58 +04:00
|
|
|
|
|
|
|
#ifndef _MIDI_SYNTH_FILE_H
|
|
|
|
#define _MIDI_SYNTH_FILE_H
|
|
|
|
|
|
|
|
#include <BeBuild.h>
|
|
|
|
#include <MidiSynth.h>
|
|
|
|
#include <Entry.h>
|
|
|
|
|
|
|
|
typedef void (*synth_file_hook)(int32 arg);
|
|
|
|
|
2004-05-13 23:54:00 +04:00
|
|
|
class BMidiStore;
|
|
|
|
|
2002-10-26 22:51:58 +04:00
|
|
|
class BMidiSynthFile : public BMidiSynth
|
|
|
|
{
|
|
|
|
public:
|
2003-03-18 01:24:09 +03:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
BMidiSynthFile();
|
|
|
|
~BMidiSynthFile();
|
|
|
|
|
|
|
|
status_t LoadFile(const entry_ref* midi_entry_ref);
|
|
|
|
void UnloadFile(void);
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
virtual status_t Start(void);
|
|
|
|
virtual void Stop(void);
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
void Fade(void);
|
|
|
|
void Pause(void);
|
|
|
|
void Resume(void);
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
int32 Duration(void) const;
|
|
|
|
int32 Position(int32 ticks) const;
|
|
|
|
int32 Seek();
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
status_t GetPatches(int16* pArray768, int16* pReturnedCount) const;
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
void SetFileHook(synth_file_hook pSongHook, int32 arg);
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
bool IsFinished(void) const;
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
void ScaleTempoBy(double tempoFactor);
|
|
|
|
void SetTempo(int32 newTempoBPM);
|
|
|
|
int32 Tempo(void) const;
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
void EnableLooping(bool loop);
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
void MuteTrack(int16 track, bool do_mute);
|
|
|
|
void GetMuteMap(char* pTracks) const;
|
|
|
|
|
|
|
|
void SoloTrack(int16 track, bool do_solo);
|
|
|
|
void GetSoloMap(char* pTracks) const;
|
2002-10-26 22:51:58 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2003-03-18 01:24:09 +03:00
|
|
|
friend class BSynth;
|
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
virtual void _ReservedMidiSynthFile1();
|
|
|
|
virtual void _ReservedMidiSynthFile2();
|
|
|
|
virtual void _ReservedMidiSynthFile3();
|
2002-10-26 22:51:58 +04:00
|
|
|
|
2006-06-19 17:24:04 +04:00
|
|
|
BMidiStore* fStore;
|
2004-05-13 23:54:00 +04:00
|
|
|
|
|
|
|
int32 _reserved[3];
|
2002-10-26 22:51:58 +04:00
|
|
|
};
|
|
|
|
|
2002-11-01 19:11:03 +03:00
|
|
|
#endif // _MIDI_SYNTH_FILE
|