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

mmdevice: initialize mute & volume (fixes #7203)

parent cf189e0e
......@@ -504,6 +504,24 @@ static void MMSession(audio_output_t *aout, aout_sys_t *sys)
&sys->session_events);
}
if (sys->volume != NULL)
{ /* Get current values (_after_ changes notification registration) */
BOOL mute;
float level;
hr = ISimpleAudioVolume_GetMute(sys->volume, &mute);
if (FAILED(hr))
msg_Err(aout, "cannot get mute (error 0x%lx)", hr);
else
aout_MuteReport(aout, mute != FALSE);
hr = ISimpleAudioVolume_GetMasterVolume(sys->volume, &level);
if (FAILED(hr))
msg_Err(aout, "cannot get mute (error 0x%lx)", hr);
else
aout_VolumeReport(aout, level);
}
SetEvent(sys->device_ready);
/* Wait until device change or exit */
WaitForSingleObject(sys->device_changed, INFINITE);
......
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