]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Don't mute if the volume control is at minimum (-144.0) and ignore_volume_control...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 29 Sep 2023 08:41:07 +0000 (09:41 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 29 Sep 2023 08:41:07 +0000 (09:41 +0100)
player.c

index 42e0b86c304133af20a6551c873c0b3467b1bb2d..8c17527222558545e5d00746947bb5d65c374dd0 100644 (file)
--- 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) {