Update VLC Mute logic

This updates it to support mixer passthrough, and accommodate cases where the mute function wasn't supported.
This commit is contained in:
pjft 2024-02-26 10:07:54 +00:00
parent fc66fd78ac
commit 0aa10ae9a1

View file

@ -344,8 +344,7 @@ void VideoVlcComponent::stopVideo()
void VideoVlcComponent::setMuteMode()
{
Settings *cfg = Settings::getInstance();
if (!cfg->getBool("VideoAudio") || (cfg->getBool("ScreenSaverVideoMute") && mScreensaverMode))
libvlc_audio_set_mute(mMediaPlayer, 1);
else
libvlc_audio_set_mute(mMediaPlayer, 0);
if (!cfg->getBool("VideoAudio") || (cfg->getBool("ScreenSaverVideoMute") && mScreensaverMode)) {
libvlc_media_add_option(mMedia, ":no-audio");
}
}