]> git.sesse.net Git - nageru/blobdiff - resampling_queue.h
Make ResamplingQueue work as expected for output frequencies different from 48 kHz.
[nageru] / resampling_queue.h
index e43e0ea073767e45b787b2d5c9913df36eb4b22e..cfc10481c16872bb821784916bea16c4f494d452 100644 (file)
@@ -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.