diff dsp/rateconversion/Decimator.h @ 388:fac4405e6937

Fix incorrect handling of decimation factor 1; documentation
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 30 Jan 2014 09:51:06 +0000
parents ad21307eaf99
children fdaa63607c15
line wrap: on
line diff
--- a/dsp/rateconversion/Decimator.h	Tue Dec 03 10:16:49 2013 +0000
+++ b/dsp/rateconversion/Decimator.h	Thu Jan 30 09:51:06 2014 +0000
@@ -24,9 +24,6 @@
 class Decimator  
 {
 public:
-    void process( const double* src, double* dst );
-    void process( const float* src, float* dst );
-
     /**
      * Construct a Decimator to operate on input blocks of length
      * inLength, with decimation factor decFactor.  inLength should be
@@ -40,11 +37,28 @@
     Decimator( unsigned int inLength, unsigned int decFactor );
     virtual ~Decimator();
 
+    /**
+     * Process inLength samples (as supplied to constructor) from src
+     * and write inLength / decFactor samples to dst.  Note that src
+     * and dst may be the same or overlap (an intermediate buffer is
+     * used).
+     */
+    void process( const double* src, double* dst );
+
+    /**
+     * Process inLength samples (as supplied to constructor) from src
+     * and write inLength / decFactor samples to dst.  Note that src
+     * and dst may be the same or overlap (an intermediate buffer is
+     * used).
+     */
+    void process( const float* src, float* dst );
+
     int getFactor() const { return m_decFactor; }
     static int getHighestSupportedFactor() { return 8; }
 
+    void resetFilter();
+
 private:
-    void resetFilter();
     void deInitialise();
     void initialise( unsigned int inLength, unsigned int decFactor );
     void doAntiAlias( const double* src, double* dst, unsigned int length );