[vlc-commits] audio_output/mmdevice: report the mute status after it is set
Steve Lhomme
git at videolan.org
Wed Nov 25 07:20:32 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 24 09:29:42 2020 +0100| [5d14661389f84adbac27bacb0da9308425a0a3fe] | committer: Steve Lhomme
audio_output/mmdevice: report the mute status after it is set
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d14661389f84adbac27bacb0da9308425a0a3fe
---
modules/audio_output/mmdevice.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 55d0fbb57d..b4d84d0004 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -988,9 +988,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
BOOL mute;
hr = ISimpleAudioVolume_GetMute(volume, &mute);
- if (SUCCEEDED(hr))
- aout_MuteReport(aout, mute != FALSE);
- else
+ if (FAILED(hr))
msg_Err(aout, "cannot get mute (error 0x%lX)", hr);
if (sys->requested_mute >= 0)
@@ -1002,6 +1000,9 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
msg_Err(aout, "cannot set mute (error 0x%lX)", hr);
}
sys->requested_mute = -1;
+
+ if (SUCCEEDED(hr))
+ aout_MuteReport(aout, mute != FALSE);
}
SleepConditionVariableCS(&sys->work, &sys->lock, INFINITE);
More information about the vlc-commits
mailing list