diff options
author | Chris Robinson <[email protected]> | 2018-11-18 18:45:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-18 18:45:45 -0800 |
commit | bafcba7194c36eaf4fa1cb09b000170f8a138055 (patch) | |
tree | 5d81112305a2f920017bcf95a4a8221734eb2122 /Alc/backends/dsound.cpp | |
parent | b10e7d08c34bc6d46aaf61ef2a0183e7841b75f3 (diff) |
Use a std::string for the device name
Diffstat (limited to 'Alc/backends/dsound.cpp')
-rw-r--r-- | Alc/backends/dsound.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp index b642dfea..6a8b0754 100644 --- a/Alc/backends/dsound.cpp +++ b/Alc/backends/dsound.cpp @@ -398,9 +398,7 @@ ALCenum ALCdsoundPlayback_open(ALCdsoundPlayback *self, const ALCchar *deviceNam return ALC_INVALID_VALUE; } - al_free(device->DeviceName); - device->DeviceName = alstrdup(deviceName); - + device->DeviceName = deviceName; return ALC_NO_ERROR; } @@ -864,9 +862,7 @@ ALCenum ALCdsoundCapture_open(ALCdsoundCapture *self, const ALCchar *deviceName) self->BufferBytes = DSCBDescription.dwBufferBytes; SetDefaultWFXChannelOrder(device); - al_free(device->DeviceName); - device->DeviceName = alstrdup(deviceName); - + device->DeviceName = deviceName; return ALC_NO_ERROR; } |