audio_output/mmdevice: report the mute status after it is set

This commit is contained in:
Steve Lhomme 2020-11-24 09:29:42 +01:00
parent a300249e98
commit 5d14661389
1 changed files with 4 additions and 3 deletions

View File

@ -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);