File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -204,15 +204,15 @@ class AudioFFTBase : public AudioPrint {
204
204
void resultArray (AudioFFTResult (&result)[N]){
205
205
// initialize to negative value
206
206
for (int j=0 ;j<N;j++){
207
- result[j].fft = -1000000 ;
207
+ result[j].magnitude = -1000000 ;
208
208
}
209
209
// find top n values
210
210
AudioFFTResult act;
211
211
for (int j=1 ;j<size ();j++){
212
212
act.magnitude = magnitude (j);
213
213
act.bin = j;
214
214
act.frequency = frequency (j);
215
- insertSorted (result, act);
215
+ insertSorted<N> (result, act);
216
216
}
217
217
}
218
218
@@ -319,7 +319,7 @@ class AudioFFTBase : public AudioPrint {
319
319
320
320
// / make sure that we do not reuse already found results
321
321
template <int N>
322
- bool InsertSorted (AudioFFTResult(&result)[N], AudioFFTResult tmp){
322
+ bool insertSorted (AudioFFTResult(&result)[N], AudioFFTResult tmp){
323
323
for (int j=0 ;j<N;j++){
324
324
if (tmp.magnitude >result[j].magnitude ){
325
325
// shift existing values right
You can’t perform that action at this time.
0 commit comments