Commit 54536c58 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mmdevice: improve diagnostics

parent 8da16971
...@@ -704,6 +704,9 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it) ...@@ -704,6 +704,9 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
{ {
msg_Dbg(aout, "using selected device %ls", sys->device); msg_Dbg(aout, "using selected device %ls", sys->device);
hr = IMMDeviceEnumerator_GetDevice(it, sys->device, &sys->dev); hr = IMMDeviceEnumerator_GetDevice(it, sys->device, &sys->dev);
if (FAILED(hr))
msg_Err(aout, "cannot get selected device %ls (error 0x%lx)",
sys->device, hr);
free(sys->device); free(sys->device);
} }
else else
...@@ -715,6 +718,8 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it) ...@@ -715,6 +718,8 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
msg_Dbg(aout, "using default device"); msg_Dbg(aout, "using default device");
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(it, eRender, hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(it, eRender,
eConsole, &sys->dev); eConsole, &sys->dev);
if (FAILED(hr))
msg_Err(aout, "cannot get default device (error 0x%lx)", hr);
} }
sys->device = NULL; sys->device = NULL;
...@@ -738,7 +743,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it) ...@@ -738,7 +743,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
} }
else else
{ {
msg_Err(aout, "cannot get device (error 0x%lx)", hr); msg_Err(aout, "cannot get device identifier (error 0x%lx)", hr);
return hr; return hr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment