aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/coreaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-18 18:45:45 -0800
committerChris Robinson <[email protected]>2018-11-18 18:45:45 -0800
commitbafcba7194c36eaf4fa1cb09b000170f8a138055 (patch)
tree5d81112305a2f920017bcf95a4a8221734eb2122 /Alc/backends/coreaudio.cpp
parentb10e7d08c34bc6d46aaf61ef2a0183e7841b75f3 (diff)
Use a std::string for the device name
Diffstat (limited to 'Alc/backends/coreaudio.cpp')
-rw-r--r--Alc/backends/coreaudio.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp
index a7d5445e..158331f1 100644
--- a/Alc/backends/coreaudio.cpp
+++ b/Alc/backends/coreaudio.cpp
@@ -143,8 +143,7 @@ static ALCenum ALCcoreAudioPlayback_open(ALCcoreAudioPlayback *self, const ALCch
return ALC_INVALID_VALUE;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name);
+ device->DeviceName = name;
return ALC_NO_ERROR;
}
@@ -674,9 +673,7 @@ static ALCenum ALCcoreAudioCapture_open(ALCcoreAudioCapture *self, const ALCchar
);
if(!self->ring) goto error;
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name);
-
+ device->DeviceName = name;
return ALC_NO_ERROR;
error: