comparison src/BTrack.h @ 26:e4d5f045064d develop

Replaced the pointers to arrays in BTrack with vectors
author Adam <adamstark.uk@gmail.com>
date Mon, 27 Jan 2014 23:54:18 +0000
parents deb49a2590f3
children 7af87d3f2ce2
comparison
equal deleted inserted replaced
25:20917cfb56a0 26:e4d5f045064d
21 21
22 #ifndef __BTRACK_H 22 #ifndef __BTRACK_H
23 #define __BTRACK_H 23 #define __BTRACK_H
24 24
25 #include "OnsetDetectionFunction.h" 25 #include "OnsetDetectionFunction.h"
26 #include <vector>
26 27
27 //======================================================================= 28 //=======================================================================
28 /** The main beat tracking class and the interface to the BTrack 29 /** The main beat tracking class and the interface to the BTrack
29 * beat tracking algorithm. The algorithm can process either 30 * beat tracking algorithm. The algorithm can process either
30 * audio frames or onset detection function samples and also 31 * audio frames or onset detection function samples and also
170 /** An OnsetDetectionFunction instance for calculating onset detection functions */ 171 /** An OnsetDetectionFunction instance for calculating onset detection functions */
171 OnsetDetectionFunction odf; 172 OnsetDetectionFunction odf;
172 173
173 //======================================================================= 174 //=======================================================================
174 // buffers 175 // buffers
175 double *onsetDF; /**< to hold onset detection function */ 176
177 std::vector<double> onsetDF; /**< to hold onset detection function */
178 std::vector<double> cumulativeScore; /**< to hold cumulative score */
179
176 double resampledOnsetDF[512]; /**< to hold resampled detection function */ 180 double resampledOnsetDF[512]; /**< to hold resampled detection function */
177 double *cumulativeScore; /**< to hold cumulative score */
178 181
179 double acf[512]; /**< to hold autocorrelation function */ 182 double acf[512]; /**< to hold autocorrelation function */
180 183
181 double weightingVector[128]; /**< to hold weighting vector */ 184 double weightingVector[128]; /**< to hold weighting vector */
182 185