diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 8 | ||||
-rw-r--r-- | OpenAL32/alMidi.c | 28 |
2 files changed, 7 insertions, 29 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 7688c84e..cb546d8f 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -119,8 +119,8 @@ typedef void (AL_APIENTRY*LPALFONTSOUNDISOFT)(ALuint id, ALenum param, ALint val typedef void (AL_APIENTRY*LPALFONTSOUND2ISOFT)(ALuint id, ALenum param, ALint value1, ALint value2); typedef void (AL_APIENTRY*LPALFONTSOUNDIVSOFT)(ALuint id, ALenum param, const ALint *values); typedef void (AL_APIENTRY*LPALGETFONTSOUNDIVSOFT)(ALuint id, ALenum param, ALint *values); -typedef void (AL_APIENTRY*LPALMIDISOUNDFONTSOFT)(const char *filename); -typedef void (AL_APIENTRY*LPALMIDISOUNDFONTSSOFT)(ALsizei count, const ALuint *ids); +typedef void (AL_APIENTRY*LPALMIDISOUNDFONTSOFT)(ALuint id); +typedef void (AL_APIENTRY*LPALMIDISOUNDFONTVSOFT)(ALsizei count, const ALuint *ids); typedef void (AL_APIENTRY*LPALMIDIEVENTSOFT)(ALuint64SOFT time, ALenum event, ALsizei channel, ALsizei param1, ALsizei param2); typedef void (AL_APIENTRY*LPALMIDISYSEXSOFT)(ALuint64SOFT time, const ALbyte *data, ALsizei size); typedef void (AL_APIENTRY*LPALMIDIPLAYSOFT)(void); @@ -157,8 +157,8 @@ AL_API void AL_APIENTRY alFontsound2iSOFT(ALuint id, ALenum param, ALint value1, AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint *values); AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *values); -AL_API void AL_APIENTRY alMidiSoundfontSOFT(const char *filename); -AL_API void AL_APIENTRY alMidiSoundfontsSOFT(ALsizei count, const ALuint *ids); +AL_API void AL_APIENTRY alMidiSoundfontSOFT(ALuint id); +AL_API void AL_APIENTRY alMidiSoundfontvSOFT(ALsizei count, const ALuint *ids); AL_API void AL_APIENTRY alMidiEventSOFT(ALuint64SOFT time, ALenum event, ALsizei channel, ALsizei param1, ALsizei param2); AL_API void AL_APIENTRY alMidiSysExSOFT(ALuint64SOFT time, const ALbyte *data, ALsizei size); AL_API void AL_APIENTRY alMidiPlaySOFT(void); diff --git a/OpenAL32/alMidi.c b/OpenAL32/alMidi.c index f95883dd..b0c63f24 100644 --- a/OpenAL32/alMidi.c +++ b/OpenAL32/alMidi.c @@ -25,34 +25,12 @@ MidiSynth *SynthCreate(ALCdevice *device) } -AL_API void AL_APIENTRY alMidiSoundfontSOFT(const char *filename) +AL_API void AL_APIENTRY alMidiSoundfontSOFT(ALuint id) { - ALCdevice *device; - ALCcontext *context; - MidiSynth *synth; - ALenum err; - - context = GetContextRef(); - if(!context) return; - - device = context->Device; - synth = device->Synth; - - WriteLock(&synth->Lock); - if(synth->State == AL_PLAYING || synth->State == AL_PAUSED) - alSetError(context, AL_INVALID_OPERATION); - else - { - err = V(synth,loadSoundfont)(filename); - if(err != AL_NO_ERROR) - alSetError(context, err); - } - WriteUnlock(&synth->Lock); - - ALCcontext_DecRef(context); + alMidiSoundfontvSOFT(1, &id); } -AL_API void AL_APIENTRY alMidiSoundfontsSOFT(ALsizei count, const ALuint *ids) +AL_API void AL_APIENTRY alMidiSoundfontvSOFT(ALsizei count, const ALuint *ids) { ALCdevice *device; ALCcontext *context; |