aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/coreaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/coreaudio.c')
-rw-r--r--Alc/backends/coreaudio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c
index 5c9b69c8..b3583ffd 100644
--- a/Alc/backends/coreaudio.c
+++ b/Alc/backends/coreaudio.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <alloca.h>
#include "alMain.h"
#include "alu.h"
@@ -180,7 +181,7 @@ static ALCenum ca_open_playback(ALCdevice *device, const ALCchar *deviceName)
return ALC_INVALID_VALUE;
}
- device->DeviceName = strdup(deviceName);
+ al_string_copy_cstr(&device->DeviceName, deviceName);
device->ExtraData = data;
return ALC_NO_ERROR;
}
@@ -577,6 +578,8 @@ static ALCenum ca_open_capture(ALCdevice *device, const ALCchar *deviceName)
if(data->ring == NULL)
goto error;
+ al_string_copy_cstr(&device->DeviceName, deviceName);
+
return ALC_NO_ERROR;
error: