From 7b93e10f7a24b7e18c916b0f791d9998f9b4b800 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 28 Mar 2014 22:11:34 -0700 Subject: Use an al_string for the device name --- Alc/backends/mmdevapi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Alc/backends/mmdevapi.c') diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c index 9933c873..b713e831 100644 --- a/Alc/backends/mmdevapi.c +++ b/Alc/backends/mmdevapi.c @@ -652,13 +652,8 @@ static DWORD CALLBACK MMDevApiMsgProc(void *ptr) hr = IMMDevice_Activate(data->mmdev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, &ptr); if(SUCCEEDED(hr)) { - al_string str; - data->client = ptr; - AL_STRING_INIT(str); - get_device_name(data->mmdev, &str); - device->DeviceName = strdup(al_string_get_cstr(str)); - AL_STRING_DEINIT(str); + get_device_name(data->mmdev, &device->DeviceName); } if(FAILED(hr)) @@ -875,7 +870,7 @@ static ALCenum MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceName hr = E_FAIL; for(i = 0;i < NumPlaybackDevices;i++) { - if(strcmp(deviceName, al_string_get_cstr(PlaybackDeviceList[i].name)) == 0) + if(al_string_cmp_cstr(PlaybackDeviceList[i].name, deviceName) == 0) { data->devid = strdupW(PlaybackDeviceList[i].devid); hr = S_OK; -- cgit v1.2.3