aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.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/winmm.cpp
parentb10e7d08c34bc6d46aaf61ef2a0183e7841b75f3 (diff)
Use a std::string for the device name
Diffstat (limited to 'Alc/backends/winmm.cpp')
-rw-r--r--Alc/backends/winmm.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp
index 8b97daab..9da3e4c3 100644
--- a/Alc/backends/winmm.cpp
+++ b/Alc/backends/winmm.cpp
@@ -285,8 +285,7 @@ retry_open:
return ALC_INVALID_VALUE;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(PlaybackDevices[DeviceID].c_str());
+ device->DeviceName = PlaybackDevices[DeviceID];
return ALC_NO_ERROR;
}
@@ -606,8 +605,7 @@ ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *deviceName)
self->WaveBuffer[i].dwBufferLength = self->WaveBuffer[i-1].dwBufferLength;
}
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(CaptureDevices[DeviceID].c_str());
+ device->DeviceName = CaptureDevices[DeviceID];
return ALC_NO_ERROR;
}