diff options
author | Chris Robinson <[email protected]> | 2013-12-19 00:57:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-19 00:57:07 -0800 |
commit | 99933fac4940303903fcf4fbb022f48824196ed9 (patch) | |
tree | 8d7e345003f87f34e5990c7127240e2f6a638ea3 /Alc/ALc.c | |
parent | 57491bf14c43de01ffcbcd61d6bdff6df49f4066 (diff) |
Allow creating instrument objects
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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); |