From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 29 Sep 2023 08:41:07 +0000 (+0100) Subject: Don't mute if the volume control is at minimum (-144.0) and ignore_volume_control... X-Git-Tag: 4.3.2^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c36d322a9195406ab66f6f710a636e4bd6603936;p=thirdparty%2Fshairport-sync.git Don't mute if the volume control is at minimum (-144.0) and ignore_volume_control is seelcted. --- diff --git a/player.c b/player.c index 42e0b86c..8c175272 100644 --- a/player.c +++ b/player.c @@ -3375,20 +3375,21 @@ void player_volume_without_notification(double airplay_volume, rtsp_conn_info *c // we have to consider the settings ignore_volume_control and mute. if (airplay_volume == -144.0) { - - if ((config.output->mute) && (config.output->mute(1) == 0)) - debug(2, - "player_volume_without_notification: volume mode is %d, airplay_volume is %f, " - "hardware mute is enabled.", - volume_mode, airplay_volume); - else { - conn->software_mute_enabled = 1; - debug(2, - "player_volume_without_notification: volume mode is %d, airplay_volume is %f, " - "software mute is enabled.", - volume_mode, airplay_volume); + // only mute if you're not ignoring the volume control + if (config.ignore_volume_control == 0) { + if ((config.output->mute) && (config.output->mute(1) == 0)) + debug(2, + "player_volume_without_notification: volume mode is %d, airplay_volume is %f, " + "hardware mute is enabled.", + volume_mode, airplay_volume); + else { + conn->software_mute_enabled = 1; + debug(2, + "player_volume_without_notification: volume mode is %d, airplay_volume is %f, " + "software mute is enabled.", + volume_mode, airplay_volume); + } } - } else { int32_t max_db = 0, min_db = 0; switch (volume_mode) {