See cautions in FFT.h !
| 511 | |
| 512 | // See cautions in FFT.h ! |
| 513 | void 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 | |
| 536 | void DerivativeOfWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *in) |
| 537 | { |