MCPcopy Create free account
hub / github.com/audacity/audacity / WindowFunc

Function WindowFunc

libraries/lib-fft/FFT.cpp:513–534  ·  view source on GitHub ↗

See cautions in FFT.h !

Source from the content-addressed store, hash-verified

511
512// See cautions in FFT.h !
513void WindowFunc(int whichFunction, size_t NumSamples, float *in)
514{
515 bool extraSample = false;
516 switch (whichFunction)
517 {
518 case eWinFuncHamming:
519 case eWinFuncHann:
520 case eWinFuncBlackman:
521 case eWinFuncBlackmanHarris:
522 extraSample = true;
523 break;
524 default:
525 break;
526 case eWinFuncBartlett:
527 // PRL: Do nothing here either
528 // But I want to comment that the old function did this case
529 // wrong in the second half of the array, in case NumSamples was odd
530 // but I think that never happened, so I am not bothering to preserve that
531 break;
532 }
533 NewWindowFunc(whichFunction, NumSamples, extraSample, in);
534}
535
536void DerivativeOfWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *in)
537{

Callers 3

CalculateMethod · 0.85
ComputeSpectrumFunction · 0.85
processMethod · 0.85

Calls 1

NewWindowFuncFunction · 0.85

Tested by 2

CalculateMethod · 0.68
ComputeSpectrumFunction · 0.68