NO-OP; Backport changes from Mixbus branch
[ardour.git] / gtk2_ardour / fft.h
index d80616b77fdb75927cb023894f530c96c78300aa..6022f1c7704cd27e938802ba199461b439b9289d 100644 (file)
@@ -30,7 +30,9 @@
 #include <fftw3.h>
 
 
-#include <ardour/types.h>
+#include "ardour/types.h"
+
+namespace GTKArdour {
 
 class FFT
 {
@@ -38,8 +40,13 @@ class FFT
                FFT(uint32_t);
                ~FFT();
 
+               enum WindowingType {
+                       NONE,
+                       HANN
+               };
+
                void reset();
-               void analyze(ARDOUR::Sample *);
+               void analyze(ARDOUR::Sample *, WindowingType w = NONE);
                void calculate();
 
                uint32_t bins() const { return _data_size; }
@@ -47,12 +54,17 @@ class FFT
                float power_at_bin(uint32_t i) const { return _power_at_bin[i]; }
                float phase_at_bin(uint32_t i) const { return _phase_at_bin[i]; }
 
+
        private:
 
+               float *get_hann_window();
+
                uint32_t const _window_size;
                uint32_t const _data_size;
                uint32_t _iterations;
 
+               float *_hann_window;
+
                float *_fftInput;
                float *_fftOutput;
 
@@ -62,4 +74,6 @@ class FFT
                fftwf_plan _plan;
 };
 
+}
+
 #endif