diff options
author | Chris Robinson <[email protected]> | 2014-03-28 22:11:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-03-28 22:11:34 -0700 |
commit | 7b93e10f7a24b7e18c916b0f791d9998f9b4b800 (patch) | |
tree | 204d07479d2f25e4170edfc80c68c810826384b2 /Alc/backends/mmdevapi.c | |
parent | 7570195b0973770e2b19551399fcf0e4d3b81a21 (diff) |
Use an al_string for the device name
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r-- | Alc/backends/mmdevapi.c | 9 |
1 files changed, 2 insertions, 7 deletions
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; |