]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Improve the logic for supressing clicks when the alsa disable_standby_mode is active.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 3 Apr 2022 09:35:48 +0000 (10:35 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 3 Apr 2022 09:35:48 +0000 (10:35 +0100)
audio_alsa.c

index 373b1db9040efd01241cc2bbf90b25d11e86fd50..e019ea563cb932c389895e3b3e79e96f8752347b 100644 (file)
@@ -1923,15 +1923,13 @@ static void flush(void) {
   // debug(2,"audio_alsa flush called.");
   pthread_cleanup_debug_mutex_lock(&alsa_mutex, 10000, 1);
   if (alsa_backend_state != abm_disconnected) { // must be playing or connected...
+    // do nothing for a flush if config.keep_dac_busy is true
     if (config.keep_dac_busy == 0) {
-      // debug(1,"flush is actually a close");
-      do_close();
-    } else {
-      // debug(1,"flush is a real flush");
       sub_flush();
     }
-  } else
+  } else {
     debug(3, "alsa: flush() -- called on a disconnected alsa backend");
+  }
   debug_mutex_unlock(&alsa_mutex, 3);
   pthread_cleanup_pop(0); // release the mutex
 }