]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Use hardware volume control only to mute when there is a mixer but no switch.
authorMike Brady <mikebrady@eircom.net>
Fri, 5 May 2017 16:04:08 +0000 (17:04 +0100)
committerMike Brady <mikebrady@eircom.net>
Fri, 5 May 2017 16:04:08 +0000 (17:04 +0100)
player.c

index a1cf082d562bdfcf5f0f065b2886017ed64ef5c6..2ccfdf945ee033025f8e2563254b72fb96b0c1b3 100644 (file)
--- a/player.c
+++ b/player.c
@@ -2231,8 +2231,10 @@ void player_volume(double airplay_volume, rtsp_conn_info* conn) {
            // debug(1,"Mute, with hardware mute and software_attenuation set to %d.",software_attenuation);
       config.output->mute(1); // use real mute if it's there
     } else {
-           software_attenuation = sw_min_db; // set any software output to zero too
+       if (config.output->volume==NULL) { // if there is also no hardware volume control
+               software_attenuation = sw_min_db; // set any software output to zero too
            // debug(1,"Mute, with no hardware mute and software_attenuation set to %d.",software_attenuation);
+           }
     }
   } else {
     if (config.output->mute)