diff options
Diffstat (limited to 'audio/out/ao_wasapi_changenotify.c')
-rw-r--r-- | audio/out/ao_wasapi_changenotify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/out/ao_wasapi_changenotify.c b/audio/out/ao_wasapi_changenotify.c index c25b806c8e..661e957bcc 100644 --- a/audio/out/ao_wasapi_changenotify.c +++ b/audio/out/ao_wasapi_changenotify.c @@ -122,7 +122,6 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnDefaultDeviceChanged( { change_notify *change = (change_notify *)This; struct ao *ao = change->ao; - struct wasapi_state *state = ao->priv; // don't care about "eCapture" or non-"eMultimedia" roles if (flow == eCapture || role != eMultimedia) return S_OK; @@ -133,9 +132,10 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnDefaultDeviceChanged( ao_hotplug_event(ao); } else { // stay on the device the user specified - if (state->opt_device) { + bstr device = wasapi_get_specified_device_string(ao); + if (device.len) { MP_VERBOSE(ao, "OnDefaultDeviceChanged triggered: " - "staying on specified device %s\n", state->opt_device); + "staying on specified device %.*s\n", BSTR_P(device)); return S_OK; } |