File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ int main(int argc, char *argv[])
358
358
{
359
359
for ( i = framePointer, j = 0 ; i < (framePointer + N) && framePointer < roof - N ; i++, j++ )
360
360
{
361
- // Apply window function on the sample
361
+ // Apply Hanning window function on the sample
362
362
double multiplier = 0.5 * (1 - cos (2 * M_PI * j / (N - 1 )));
363
363
in[j].r = multiplier * data[i];
364
364
in[j].i = 0 ; // stores N samples
@@ -377,6 +377,7 @@ int main(int argc, char *argv[])
377
377
}
378
378
379
379
// std::cout<<"Framepointer = "<<framePointer<<std::endl;
380
+ // get fft values from kissfft
380
381
getFft (in, out);
381
382
382
383
// calculate magnitude of first n/2 FFT
@@ -444,6 +445,7 @@ int main(int argc, char *argv[])
444
445
std::cout<<" actual no of samples: " <<ampdb.size ();
445
446
// std::vector<int>::size_type sz = ampdb.size();
446
447
448
+ // frequency mapping of amplitudes
447
449
int k=0 ;
448
450
for (int i=0 ;i<(SAMPLE_COUNT)/(SAMPLE_RATE*0.1 );i++)
449
451
{
You can’t perform that action at this time.
0 commit comments