diff options
author | Chris Robinson <[email protected]> | 2013-12-17 21:56:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-17 21:56:28 -0800 |
commit | ef0341c180789aaf95daabc5bc76b02bad174f80 (patch) | |
tree | 9fd49350dbcacbb5adb12444d5a362e6f5574706 /OpenAL32/Include/alMidi.h | |
parent | 7f515691869a1ef79a0946c2a0223ce4991540da (diff) |
Make MidiSynth's methods non-static
Diffstat (limited to 'OpenAL32/Include/alMidi.h')
-rw-r--r-- | OpenAL32/Include/alMidi.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h index eb36adcf..cbe06303 100644 --- a/OpenAL32/Include/alMidi.h +++ b/OpenAL32/Include/alMidi.h @@ -2,6 +2,7 @@ #define ALMIDI_H #include "alMain.h" +#include "atomic.h" #include "evtqueue.h" #ifdef __cplusplus @@ -32,8 +33,26 @@ typedef struct MidiSynth { const struct MidiSynthVtable *vtbl; } MidiSynth; -ALfloat MidiSynth_getGain(const MidiSynth *self); +void MidiSynth_Construct(MidiSynth *self, ALCdevice *device); +void MidiSynth_Destruct(MidiSynth *self); +const char *MidiSynth_getFontName(const MidiSynth *self, const char *filename); +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); } +void MidiSynth_stop(MidiSynth *self); +inline void MidiSynth_reset(MidiSynth *self) { MidiSynth_stop(self); } ALuint64 MidiSynth_getTime(const MidiSynth *self); +inline ALuint64 MidiSynth_getNextEvtTime(const MidiSynth *self) +{ + if(self->EventQueue.pos == self->EventQueue.size) + return UINT64_MAX; + return self->EventQueue.events[self->EventQueue.pos].time; +} +void MidiSynth_setSampleRate(MidiSynth *self, ALdouble srate); +inline void MidiSynth_update(MidiSynth *self, ALCdevice *device) +{ MidiSynth_setSampleRate(self, device->Frequency); } +ALenum MidiSynth_insertEvent(MidiSynth *self, ALuint64 time, ALuint event, ALsizei param1, ALsizei param2); +ALenum MidiSynth_insertSysExEvent(MidiSynth *self, ALuint64 time, const ALbyte *data, ALsizei size); struct MidiSynthVtable { |