2013-10-15 11:49:53 -03:00
|
|
|
#ifndef __BMPlayer_h__
|
|
|
|
#define __BMPlayer_h__
|
|
|
|
|
|
|
|
#include "MIDIPlayer.h"
|
|
|
|
|
2016-06-19 16:06:55 -04:00
|
|
|
#include <bassmidi.h>
|
|
|
|
|
|
|
|
typedef struct sflist_presets sflist_presets;
|
2013-10-15 11:49:53 -03:00
|
|
|
|
2022-02-07 02:49:27 -03:00
|
|
|
class BMPlayer : public MIDIPlayer {
|
|
|
|
public:
|
2013-10-15 11:49:53 -03:00
|
|
|
// zero variables
|
|
|
|
BMPlayer();
|
|
|
|
|
|
|
|
// close, unload
|
|
|
|
virtual ~BMPlayer();
|
|
|
|
|
|
|
|
// configuration
|
2022-02-07 02:49:27 -03:00
|
|
|
void setSoundFont(const char* in);
|
|
|
|
void setFileSoundFont(const char* in);
|
2013-10-15 11:49:53 -03:00
|
|
|
void setSincInterpolation(bool enable = true);
|
|
|
|
|
2022-02-07 02:49:27 -03:00
|
|
|
private:
|
2016-04-13 01:16:25 -03:00
|
|
|
virtual void send_event(uint32_t b);
|
2022-02-09 23:36:37 -03:00
|
|
|
virtual void send_sysex(const uint8_t* data, size_t size, size_t port);
|
2022-02-07 02:49:27 -03:00
|
|
|
virtual void render(float* out, unsigned long count);
|
2013-10-15 11:49:53 -03:00
|
|
|
|
|
|
|
virtual void shutdown();
|
|
|
|
virtual bool startup();
|
2022-02-07 02:49:27 -03:00
|
|
|
|
|
|
|
void compound_presets(std::vector<BASS_MIDI_FONTEX>& out, std::vector<BASS_MIDI_FONTEX>& in, std::vector<long>& channels);
|
2013-10-15 11:49:53 -03:00
|
|
|
|
2013-10-19 01:01:19 -03:00
|
|
|
void reset_parameters();
|
2013-10-15 11:49:53 -03:00
|
|
|
|
2022-02-07 02:49:27 -03:00
|
|
|
std::vector<HSOUNDFONT> _soundFonts;
|
|
|
|
sflist_presets* _presetList;
|
|
|
|
std::string sSoundFontName;
|
|
|
|
std::string sFileSoundFontName;
|
|
|
|
|
|
|
|
HSTREAM _stream[3];
|
2013-10-15 11:49:53 -03:00
|
|
|
|
2022-02-07 02:49:27 -03:00
|
|
|
bool bSincInterpolation;
|
2013-10-15 11:49:53 -03:00
|
|
|
|
2022-02-07 02:49:27 -03:00
|
|
|
bool bank_lsb_overridden;
|
|
|
|
uint8_t bank_lsb_override[48];
|
2013-10-15 11:49:53 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|