static
| 584 | |
| 585 | //static |
| 586 | uint32_t HRTFPanner::fftSizeForSampleLength(int sampleLength) |
| 587 | { |
| 588 | // originally, this routine assumed 512 sample length impulse responses |
| 589 | // truncated to 256 samples, and returned an fft size of 512 for those samples. |
| 590 | // to match the reasoning, if the bus is not a power of 2 size, round down to the |
| 591 | // previous power of 2 size. |
| 592 | // return double the power of 2 size of the bus. |
| 593 | // the original logic also doubled the fft size for sample rates >= 88200, |
| 594 | // but that feels a bit nonsense, so it's not emulated here. |
| 595 | |
| 596 | int s = RoundNextPow2(sampleLength); |
| 597 | if (s > sampleLength) |
| 598 | s /= 2; |
| 599 | |
| 600 | return s * 2; |
| 601 | } |
| 602 | |
| 603 | void HRTFPanner::reset() |
| 604 | { |
nothing calls this directly
no test coverage detected