From db74419bd7b39f72850c6557aa7d573d9702db39 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Tue, 18 May 2021 17:25:22 -0700 Subject: [PATCH] correct threshold --- components/squeezelite/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/squeezelite/output.c b/components/squeezelite/output.c index 7d52dadf..cf420065 100644 --- a/components/squeezelite/output.c +++ b/components/squeezelite/output.c @@ -60,7 +60,7 @@ frames_t _output_frames(frames_t avail) { silence = false; // start when threshold met - if (output.state == OUTPUT_BUFFER && frames > output.threshold * output.next_sample_rate / 10 && frames > output.start_frames) { + if (output.state == OUTPUT_BUFFER && (frames * BYTES_PER_FRAME) > output.threshold * output.next_sample_rate / 10 && frames > output.start_frames) { output.state = OUTPUT_RUNNING; LOG_INFO("start buffer frames: %u", frames); wake_controller();