Update soundfont selection functions
A filename is no longer specified, and alMidiSoundfontsSOFT is renamed to alMidiSoundfontvSOFT.
This commit is contained in:
@@ -304,7 +304,7 @@ static const ALCfunction alcFunctions[] = {
|
||||
DECL(alFontsoundivSOFT),
|
||||
DECL(alGetFontsoundivSOFT),
|
||||
DECL(alMidiSoundfontSOFT),
|
||||
DECL(alMidiSoundfontsSOFT),
|
||||
DECL(alMidiSoundfontvSOFT),
|
||||
DECL(alMidiEventSOFT),
|
||||
DECL(alMidiSysExSOFT),
|
||||
DECL(alMidiPlaySOFT),
|
||||
|
||||
@@ -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);
|
||||
|
||||
+3
-25
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user