diff options
author | Chris Robinson <[email protected]> | 2018-11-18 19:28:01 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-18 19:28:01 -0800 |
commit | 140c139852de0bde537de0314e30239832f309f1 (patch) | |
tree | 3006aafe758d4264417b317662a45e116af4c161 /Alc/panning.cpp | |
parent | 2c06ec709324b7aebdb71961a428362cfcafa68f (diff) |
Use a standard string for the device's HRTF name
Diffstat (limited to 'Alc/panning.cpp')
-rw-r--r-- | Alc/panning.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Alc/panning.cpp b/Alc/panning.cpp index d5c8bbdf..aface673 100644 --- a/Alc/panning.cpp +++ b/Alc/panning.cpp @@ -933,8 +933,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf al_free(device->Hrtf); device->Hrtf = NULL; device->HrtfHandle = NULL; - al_free(device->HrtfName); - device->HrtfName = NULL; + device->HrtfName.clear(); device->Render_Mode = NormalRender; memset(&device->Dry.Ambi, 0, sizeof(device->Dry.Ambi)); @@ -1114,7 +1113,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf if(hrtf && hrtf->sampleRate == device->Frequency) { device->HrtfHandle = hrtf; - device->HrtfName = alstrdup(entry.name); + device->HrtfName = entry.name; } else if(hrtf) Hrtf_DecRef(hrtf); @@ -1127,7 +1126,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf if(hrtf && hrtf->sampleRate == device->Frequency) { device->HrtfHandle = hrtf; - device->HrtfName = alstrdup(entry.name); + device->HrtfName = entry.name; } else if(hrtf) Hrtf_DecRef(hrtf); @@ -1164,7 +1163,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf } TRACE("%s HRTF rendering enabled, using \"%s\"\n", - ((device->Render_Mode == HrtfRender) ? "Full" : "Basic"), device->HrtfName + ((device->Render_Mode == HrtfRender) ? "Full" : "Basic"), device->HrtfName.c_str() ); InitHrtfPanning(device); return; |