]> git.sesse.net Git - nageru/commitdiff
Make ResamplingQueue work as expected for output frequencies different from 48 kHz.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 31 Jul 2016 14:56:19 +0000 (16:56 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 31 Jul 2016 14:56:30 +0000 (16:56 +0200)
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.