From 1cfd1241bd2d517bdd309cb2176554bf737f1937 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 31 Jul 2016 16:56:19 +0200 Subject: [PATCH] Make ResamplingQueue work as expected for output frequencies different from 48 kHz. --- resampling_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resampling_queue.h b/resampling_queue.h index e43e0ea..cfc1048 100644 --- a/resampling_queue.h +++ b/resampling_queue.h @@ -83,7 +83,7 @@ private: // How much delay we are expected to have, in input samples. // If actual delay drifts too much away from this, we will start // changing the resampling ratio to compensate. - double expected_delay = 4800.0; + double expected_delay = OUTPUT_FREQUENCY * 0.1; // 100 ms. // Input samples not yet fed into the resampler. // TODO: Use a circular buffer instead, for efficiency. -- 2.39.2