diff options
author | Chris Robinson <[email protected]> | 2013-12-18 23:12:44 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-18 23:12:44 -0800 |
commit | 73fc4592ab8fd3c3bbff608ccfbd8def756def06 (patch) | |
tree | 806efdfea428a6dd6dcb27a868aa659a82a5b3c7 | |
parent | 8083fb5be7943e6c5ade6c062ae78559c0826472 (diff) |
Make alIsSoundfontSOFT check soundfont IDs
-rw-r--r-- | OpenAL32/Include/alMain.h | 4 | ||||
-rw-r--r-- | OpenAL32/alMidi.c | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 37cab1c4..da717168 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -40,7 +40,7 @@ #define AL_PITCHBEND_SOFT 0x00E0 typedef void (AL_APIENTRY*LPALGENSOUNDFONTSSOFT)(ALsizei n, ALuint *ids); typedef void (AL_APIENTRY*LPALDELETESOUNDFONTSSOFT)(ALsizei n, const ALuint *ids); -typedef ALboolean (AL_APIENTRY*LPALISSOUNDFONTSOFT)(const char *filename); +typedef ALboolean (AL_APIENTRY*LPALISSOUNDFONTSOFT)(ALuint id); typedef void (AL_APIENTRY*LPALMIDISOUNDFONTSOFT)(const char *filename); 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); @@ -54,7 +54,7 @@ typedef void (AL_APIENTRY*LPALGETINTEGER64VSOFT)(ALenum pname, ALint64SOFT *valu #ifdef AL_ALEXT_PROTOTYPES AL_API void AL_APIENTRY alGenSoundfontsSOFT(ALsizei n, ALuint *ids); AL_API void AL_APIENTRY alDeleteSoundfontsSOFT(ALsizei n, const ALuint *ids); -AL_API ALboolean AL_APIENTRY alIsSoundfontSOFT(const char *filename); +AL_API ALboolean AL_APIENTRY alIsSoundfontSOFT(ALuint id); AL_API void AL_APIENTRY alMidiSoundfontSOFT(const char *filename); 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); diff --git a/OpenAL32/alMidi.c b/OpenAL32/alMidi.c index 74e37267..b311d390 100644 --- a/OpenAL32/alMidi.c +++ b/OpenAL32/alMidi.c @@ -115,24 +115,23 @@ done: ALCcontext_DecRef(context); } - -AL_API ALboolean AL_APIENTRY alIsSoundfontSOFT(const char *filename) +AL_API ALboolean AL_APIENTRY alIsSoundfontSOFT(ALuint id) { - ALCdevice *device; ALCcontext *context; ALboolean ret; context = GetContextRef(); if(!context) return AL_FALSE; - device = context->Device; - ret = V(device->Synth,isSoundfont)(filename); + ret = ((!id || LookupSfont(context->Device, id)) ? + AL_TRUE : AL_FALSE); ALCcontext_DecRef(context); return ret; } + AL_API void AL_APIENTRY alMidiSoundfontSOFT(const char *filename) { ALCdevice *device; |