[vlc-commits] wasapi: report volume/mute (refs #6880, refs #7203)

Rémi Denis-Courmont git at videolan.org
Mon Aug 6 20:39:31 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug  6 21:36:13 2012 +0300| [12627b888e45dc7a2abb6e157dea6fbd942e7f52] | committer: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=12627b888e45dc7a2abb6e157dea6fbd942e7f52
---

 modules/audio_output/wasapi.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 25532b7..5916277 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -207,6 +207,8 @@ static int SimpleVolumeSet(audio_output_t *aout, float vol)
     hr = ISimpleAudioVolume_SetMasterVolume(sys->volume.simple, vol, NULL);
     if (FAILED(hr))
         msg_Warn(aout, "cannot set session volume (error 0x%lx)", hr);
+    else /* Hack until volume notifications implemented: */
+        aout_VolumeReport(aout, vol);
     Leave();
     return FAILED(hr) ? -1 : 0;
 }
@@ -221,6 +223,8 @@ static int SimpleMuteSet(audio_output_t *aout, bool mute)
     hr = ISimpleAudioVolume_SetMute(sys->volume.simple, mute, NULL);
     if (FAILED(hr))
         msg_Warn(aout, "cannot mute session (error 0x%lx)", hr);
+    else /* Hack until volume notifications implemented: */
+        aout_MuteReport(aout, mute);
     Leave();
     return FAILED(hr) ? -1 : 0;
 }



More information about the vlc-commits mailing list