aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-12 19:02:38 -0800
committerChris Robinson <[email protected]>2018-11-12 19:02:38 -0800
commitd4d0b1fdd48e1c056fad9cbe3e063fc9de1a0b75 (patch)
tree444431c3168625100071641aa738adac5fb369a5 /Alc/ALc.c
parentc0f2858f3d47323205bb90b3b1cc7db2553e6917 (diff)
Use a regular char* for the HRTF string name
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index a483c94f..fc68236d 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2429,7 +2429,7 @@ static void InitDevice(ALCdevice *device, enum DeviceType type)
device->ChannelDelay[i].Buffer = NULL;
}
- AL_STRING_INIT(device->HrtfName);
+ device->HrtfName = NULL;
VECTOR_INIT(device->HrtfList);
device->HrtfHandle = NULL;
device->Hrtf = NULL;
@@ -2493,7 +2493,8 @@ static ALCvoid FreeDevice(ALCdevice *device)
VECTOR_DEINIT(device->FilterList);
almtx_destroy(&device->FilterLock);
- AL_STRING_DEINIT(device->HrtfName);
+ al_free(device->HrtfName);
+ device->HrtfName = NULL;
FreeHrtfList(&device->HrtfList);
if(device->HrtfHandle)
Hrtf_DecRef(device->HrtfHandle);
@@ -3190,7 +3191,7 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *Device, ALCenum para
else
{
almtx_lock(&Device->BackendLock);
- value = (Device->HrtfHandle ? alstr_get_cstr(Device->HrtfName) : "");
+ value = ((Device->HrtfHandle && Device->HrtfName) ? Device->HrtfName : "");
almtx_unlock(&Device->BackendLock);
ALCdevice_DecRef(Device);
}