Browse Source

correct threshold

Philippe G 3 years ago
parent
commit
db74419bd7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/squeezelite/output.c

+ 1 - 1
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();