aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/base.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-27 02:59:50 -0800
committerChris Robinson <[email protected]>2013-12-27 02:59:50 -0800
commitf85d733f9dc569bd6b3f37a0a4b8be7b3c783ad6 (patch)
treea67fa24599e54bee27a36e14e2cde8bca3348465 /Alc/midi/base.h
parent2b772a5607c2147d68eb8e45b04b2f381ec6c0ad (diff)
Add a method to set and get soundfonts
The main purpose of this is to select soundfonts for playback, eventually, instead of the existing method that takes a filename.
Diffstat (limited to 'Alc/midi/base.h')
-rw-r--r--Alc/midi/base.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Alc/midi/base.h b/Alc/midi/base.h
index 4f10b89b..d038eebc 100644
--- a/Alc/midi/base.h
+++ b/Alc/midi/base.h
@@ -27,6 +27,9 @@ typedef struct MidiSynth {
*/
RWLock Lock;
+ struct ALsoundfont **Soundfonts;
+ ALsizei NumSoundfonts;
+
volatile ALfloat Gain;
volatile ALenum State;
@@ -36,6 +39,7 @@ typedef struct MidiSynth {
void MidiSynth_Construct(MidiSynth *self, ALCdevice *device);
void MidiSynth_Destruct(MidiSynth *self);
const char *MidiSynth_getFontName(const MidiSynth *self, const char *filename);
+ALenum MidiSynth_selectSoundfonts(MidiSynth *self, ALCdevice *device, ALsizei count, const ALuint *ids);
inline void MidiSynth_setGain(MidiSynth *self, ALfloat gain) { self->Gain = gain; }
inline ALfloat MidiSynth_getGain(const MidiSynth *self) { return self->Gain; }
inline void MidiSynth_setState(MidiSynth *self, ALenum state) { ExchangeInt(&self->State, state); }
@@ -60,6 +64,7 @@ struct MidiSynthVtable {
ALboolean (*const isSoundfont)(MidiSynth *self, const char *filename);
ALenum (*const loadSoundfont)(MidiSynth *self, const char *filename);
+ ALenum (*const selectSoundfonts)(MidiSynth *self, ALCdevice *device, ALsizei count, const ALuint *ids);
void (*const setGain)(MidiSynth *self, ALfloat gain);
void (*const setState)(MidiSynth *self, ALenum state);
@@ -77,6 +82,7 @@ struct MidiSynthVtable {
DECLARE_THUNK(T, MidiSynth, void, Destruct) \
DECLARE_THUNK1(T, MidiSynth, ALboolean, isSoundfont, const char*) \
DECLARE_THUNK1(T, MidiSynth, ALenum, loadSoundfont, const char*) \
+DECLARE_THUNK3(T, MidiSynth, ALenum, selectSoundfonts, ALCdevice*, ALsizei, const ALuint*) \
DECLARE_THUNK1(T, MidiSynth, void, setGain, ALfloat) \
DECLARE_THUNK1(T, MidiSynth, void, setState, ALenum) \
DECLARE_THUNK(T, MidiSynth, void, stop) \
@@ -90,6 +96,7 @@ static const struct MidiSynthVtable T##_MidiSynth_vtable = { \
\
T##_MidiSynth_isSoundfont, \
T##_MidiSynth_loadSoundfont, \
+ T##_MidiSynth_selectSoundfonts, \
T##_MidiSynth_setGain, \
T##_MidiSynth_setState, \
T##_MidiSynth_stop, \