| 574 | } |
| 575 | |
| 576 | uint32_t HRTFPanner::fftSizeForSampleRate(float sampleRate) |
| 577 | { |
| 578 | // The HRTF impulse responses (loaded as audio resources) are 512 sample-frames @44.1KHz. |
| 579 | // Currently, we truncate the impulse responses to half this size, but an FFT-size of twice impulse response size is needed (for convolution). |
| 580 | // So for sample rates around 44.1KHz an FFT size of 512 is good. We double the FFT-size only for sample rates at least double this. |
| 581 | ASSERT(sampleRate >= 44100 && sampleRate <= 96000.0); |
| 582 | return (sampleRate < 88200.0) ? 512 : 1024; |
| 583 | } |
| 584 | |
| 585 | //static |
| 586 | uint32_t HRTFPanner::fftSizeForSampleLength(int sampleLength) |
nothing calls this directly
no outgoing calls
no test coverage detected