5c6bcab3b49f — Chris Cannam 4 months ago
Add reset
3 files changed, 10 insertions(+), 1 deletions(-)

M src/BQResampler.cpp
M src/BQResampler.h
M src/Resampler.cpp
M src/BQResampler.cpp +7 -0
@@ 115,6 115,13 @@ BQResampler::BQResampler(const BQResampl
     }
 }
 
+void
+BQResampler::reset()
+{
+    m_initialised = false;
+    m_fade_count = 0;
+}
+
 BQResampler::QualityParams::QualityParams(Quality q)
 {
     switch (q) {

          
M src/BQResampler.h +2 -0
@@ 72,6 72,8 @@ public:
                             const float *const in, int incount,
                             double ratio, bool final);
 
+    void reset();
+
 private:
     struct QualityParams {
         int p_multiple;

          
M src/Resampler.cpp +1 -1
@@ 1101,7 1101,7 @@ D_BQResampler::resampleInterleaved(float
 void
 D_BQResampler::reset()
 {
-    //!!! Not yet implemented in BQResampler
+    m_resampler->reset();
 }
 
 #endif /* USE_BQRESAMPLER */