diff base/KaiserWindow.h @ 505:930b5b0f707d

Merge branch 'codestyle-and-tidy'
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 05 Jun 2019 12:55:15 +0100
parents 701233f8ed41
children
line wrap: on
line diff
--- a/base/KaiserWindow.h	Thu May 30 16:18:13 2019 +0100
+++ b/base/KaiserWindow.h	Wed Jun 05 12:55:15 2019 +0100
@@ -11,8 +11,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef KAISER_WINDOW_H
-#define KAISER_WINDOW_H
+#ifndef QM_DSP_KAISER_WINDOW_H
+#define QM_DSP_KAISER_WINDOW_H
 
 #include <vector>
 #include <cmath>
@@ -26,8 +26,8 @@
 {
 public:
     struct Parameters {
-	int length;
-	double beta;
+        int length;
+        double beta;
     };
 
     /**
@@ -41,9 +41,9 @@
      * and transition width in samples.
      */
     static KaiserWindow byTransitionWidth(double attenuation,
-					  double transition) {
-	return KaiserWindow
-	    (parametersForTransitionWidth(attenuation, transition));
+                                          double transition) {
+        return KaiserWindow
+            (parametersForTransitionWidth(attenuation, transition));
     }
 
     /**
@@ -51,10 +51,10 @@
      * and transition bandwidth in Hz for the given samplerate.
      */
     static KaiserWindow byBandwidth(double attenuation,
-				    double bandwidth,
-				    double samplerate) {
-	return KaiserWindow
-	    (parametersForBandwidth(attenuation, bandwidth, samplerate));
+                                    double bandwidth,
+                                    double samplerate) {
+        return KaiserWindow
+            (parametersForBandwidth(attenuation, bandwidth, samplerate));
     }
 
     /**
@@ -62,7 +62,7 @@
      * given attenuation in dB and transition width in samples.
      */
     static Parameters parametersForTransitionWidth(double attenuation,
-						   double transition);
+                                                   double transition);
 
     /**
      * Obtain the parameters necessary for a Kaiser window of the
@@ -70,28 +70,28 @@
      * given samplerate.
      */
     static Parameters parametersForBandwidth(double attenuation,
-					     double bandwidth,
-					     double samplerate) {
-	return parametersForTransitionWidth
-	    (attenuation, (bandwidth * 2 * M_PI) / samplerate);
+                                             double bandwidth,
+                                             double samplerate) {
+        return parametersForTransitionWidth
+            (attenuation, (bandwidth * 2 * M_PI) / samplerate);
     } 
 
     int getLength() const {
-	return m_length;
+        return m_length;
     }
 
     const double *getWindow() const { 
-	return m_window.data();
+        return m_window.data();
     }
 
     void cut(double *src) const { 
-	cut(src, src); 
+        cut(src, src); 
     }
 
     void cut(const double *src, double *dst) const {
-	for (int i = 0; i < m_length; ++i) {
-	    dst[i] = src[i] * m_window[i];
-	}
+        for (int i = 0; i < m_length; ++i) {
+            dst[i] = src[i] * m_window[i];
+        }
     }
 
 private: