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 {
204204 void resultArray (AudioFFTResult (&result)[N]){
205205 // initialize to negative value
206206 for (int j=0 ;j<N;j++){
207- result[j].fft = -1000000 ;
207+ result[j].magnitude = -1000000 ;
208208 }
209209 // find top n values
210210 AudioFFTResult act;
211211 for (int j=1 ;j<size ();j++){
212212 act.magnitude = magnitude (j);
213213 act.bin = j;
214214 act.frequency = frequency (j);
215- insertSorted (result, act);
215+ insertSorted<N> (result, act);
216216 }
217217 }
218218
@@ -319,7 +319,7 @@ class AudioFFTBase : public AudioPrint {
319319
320320 // / make sure that we do not reuse already found results
321321 template <int N>
322- bool InsertSorted (AudioFFTResult(&result)[N], AudioFFTResult tmp){
322+ bool insertSorted (AudioFFTResult(&result)[N], AudioFFTResult tmp){
323323 for (int j=0 ;j<N;j++){
324324 if (tmp.magnitude >result[j].magnitude ){
325325 // shift existing values right
You can’t perform that action at this time.
0 commit comments