aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index be4a150b..9dcc5be0 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -287,6 +287,9 @@ static const ALCfunction alcFunctions[] = {
DECL(alGenPresetsSOFT),
DECL(alDeletePresetsSOFT),
DECL(alIsPresetSOFT),
+ DECL(alGenInstrumentsSOFT),
+ DECL(alDeleteInstrumentsSOFT),
+ DECL(alIsInstrumentSOFT),
DECL(alMidiSoundfontSOFT),
DECL(alMidiEventSOFT),
DECL(alMidiSysExSOFT),
@@ -1966,6 +1969,13 @@ static ALCvoid FreeDevice(ALCdevice *device)
}
ResetUIntMap(&device->PresetMap);
+ if(device->InstrumentMap.size > 0)
+ {
+ WARN("(%p) Deleting %d Instrument(s)\n", device, device->InstrumentMap.size);
+ ReleaseALInstruments(device);
+ }
+ ResetUIntMap(&device->InstrumentMap);
+
free(device->Bs2b);
device->Bs2b = NULL;
@@ -2904,6 +2914,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
InitUIntMap(&device->FilterMap, ~0);
InitUIntMap(&device->SfontMap, ~0);
InitUIntMap(&device->PresetMap, ~0);
+ InitUIntMap(&device->InstrumentMap, ~0);
//Set output format
device->FmtChans = DevFmtChannelsDefault;
@@ -3190,6 +3201,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
InitUIntMap(&device->FilterMap, ~0);
InitUIntMap(&device->SfontMap, ~0);
InitUIntMap(&device->PresetMap, ~0);
+ InitUIntMap(&device->InstrumentMap, ~0);
device->DeviceName = NULL;
@@ -3369,6 +3381,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
InitUIntMap(&device->FilterMap, ~0);
InitUIntMap(&device->SfontMap, ~0);
InitUIntMap(&device->PresetMap, ~0);
+ InitUIntMap(&device->InstrumentMap, ~0);
factory = ALCloopbackFactory_getFactory();
device->Backend = V(factory,createBackend)(device, ALCbackend_Loopback);