summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-19 00:09:55 -0800
committerChris Robinson <[email protected]>2013-12-19 00:09:55 -0800
commit1b5c3495c993459c8bf83c183015881cba852a11 (patch)
tree33f1039e165609b51047a963fea044f7ef60cd5c /Alc
parent1e536cf7ca6413cc20536df144bb4eba8797bbad (diff)
Add methods to create and destroy presets
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index ad30e3bf..be4a150b 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -284,6 +284,9 @@ static const ALCfunction alcFunctions[] = {
DECL(alGenSoundfontsSOFT),
DECL(alDeleteSoundfontsSOFT),
DECL(alIsSoundfontSOFT),
+ DECL(alGenPresetsSOFT),
+ DECL(alDeletePresetsSOFT),
+ DECL(alIsPresetSOFT),
DECL(alMidiSoundfontSOFT),
DECL(alMidiEventSOFT),
DECL(alMidiSysExSOFT),
@@ -1956,6 +1959,13 @@ static ALCvoid FreeDevice(ALCdevice *device)
}
ResetUIntMap(&device->SfontMap);
+ if(device->PresetMap.size > 0)
+ {
+ WARN("(%p) Deleting %d Preset(s)\n", device, device->PresetMap.size);
+ ReleaseALPresets(device);
+ }
+ ResetUIntMap(&device->PresetMap);
+
free(device->Bs2b);
device->Bs2b = NULL;
@@ -2893,6 +2903,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
InitUIntMap(&device->EffectMap, ~0);
InitUIntMap(&device->FilterMap, ~0);
InitUIntMap(&device->SfontMap, ~0);
+ InitUIntMap(&device->PresetMap, ~0);
//Set output format
device->FmtChans = DevFmtChannelsDefault;
@@ -3178,6 +3189,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
InitUIntMap(&device->EffectMap, ~0);
InitUIntMap(&device->FilterMap, ~0);
InitUIntMap(&device->SfontMap, ~0);
+ InitUIntMap(&device->PresetMap, ~0);
device->DeviceName = NULL;
@@ -3356,6 +3368,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
InitUIntMap(&device->EffectMap, ~0);
InitUIntMap(&device->FilterMap, ~0);
InitUIntMap(&device->SfontMap, ~0);
+ InitUIntMap(&device->PresetMap, ~0);
factory = ALCloopbackFactory_getFactory();
device->Backend = V(factory,createBackend)(device, ALCbackend_Loopback);