Mercurial > hg > btrack
diff src/OnsetDetectionFunction.h @ 27:98f7a54faa0c develop
Changed all pointers to arrays in OnsetDetectionFunction into vectors
author | Adam <adamstark.uk@gmail.com> |
---|---|
date | Tue, 28 Jan 2014 00:19:21 +0000 |
parents | deb49a2590f3 |
children | bddd59087c36 |
line wrap: on
line diff
--- a/src/OnsetDetectionFunction.h Mon Jan 27 23:54:18 2014 +0000 +++ b/src/OnsetDetectionFunction.h Tue Jan 28 00:19:21 2014 +0000 @@ -23,6 +23,7 @@ #define __ONSETDETECTIONFUNCTION_H #include "fftw3.h" +#include <vector> //======================================================================= /** The type of onset detection function to calculate */ @@ -157,19 +158,19 @@ fftw_complex *complexIn; /**< to hold complex fft values for input */ fftw_complex *complexOut; /**< to hold complex fft values for output */ - int initialised; /**< flag indicating whether buffers and FFT plans are initialised */ + bool initialised; /**< flag indicating whether buffers and FFT plans are initialised */ - double *frame; /**< audio frame */ - double *window; /**< window */ + std::vector<double> frame; /**< audio frame */ + std::vector<double> window; /**< window */ double prevEnergySum; /**< to hold the previous energy sum value */ - double *magSpec; /**< magnitude spectrum */ - double *prevMagSpec; /**< previous magnitude spectrum */ + std::vector<double> magSpec; /**< magnitude spectrum */ + std::vector<double> prevMagSpec; /**< previous magnitude spectrum */ - double *phase; /**< FFT phase values */ - double *prevPhase; /**< previous phase values */ - double *prevPhase2; /**< second order previous phase values */ + std::vector<double> phase; /**< FFT phase values */ + std::vector<double> prevPhase; /**< previous phase values */ + std::vector<double> prevPhase2; /**< second order previous phase values */ };