Commit 12627b88 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

wasapi: report volume/mute (refs #6880, refs #7203)

This is a temporary hack to make the volume controls mostly work until
Windows volume notifications are correctly implemented.
parent 3e954c98
...@@ -207,6 +207,8 @@ static int SimpleVolumeSet(audio_output_t *aout, float vol) ...@@ -207,6 +207,8 @@ static int SimpleVolumeSet(audio_output_t *aout, float vol)
hr = ISimpleAudioVolume_SetMasterVolume(sys->volume.simple, vol, NULL); hr = ISimpleAudioVolume_SetMasterVolume(sys->volume.simple, vol, NULL);
if (FAILED(hr)) if (FAILED(hr))
msg_Warn(aout, "cannot set session volume (error 0x%lx)", hr); msg_Warn(aout, "cannot set session volume (error 0x%lx)", hr);
else /* Hack until volume notifications implemented: */
aout_VolumeReport(aout, vol);
Leave(); Leave();
return FAILED(hr) ? -1 : 0; return FAILED(hr) ? -1 : 0;
} }
...@@ -221,6 +223,8 @@ static int SimpleMuteSet(audio_output_t *aout, bool mute) ...@@ -221,6 +223,8 @@ static int SimpleMuteSet(audio_output_t *aout, bool mute)
hr = ISimpleAudioVolume_SetMute(sys->volume.simple, mute, NULL); hr = ISimpleAudioVolume_SetMute(sys->volume.simple, mute, NULL);
if (FAILED(hr)) if (FAILED(hr))
msg_Warn(aout, "cannot mute session (error 0x%lx)", hr); msg_Warn(aout, "cannot mute session (error 0x%lx)", hr);
else /* Hack until volume notifications implemented: */
aout_MuteReport(aout, mute);
Leave(); Leave();
return FAILED(hr) ? -1 : 0; return FAILED(hr) ? -1 : 0;
} }
......
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