Normal constructor: allocates for a given fftSize
| 19 | |
| 20 | // Normal constructor: allocates for a given fftSize |
| 21 | FFTFrame::FFTFrame(int fftSize) |
| 22 | : m_realData(fftSize) |
| 23 | , m_imagData(fftSize) |
| 24 | { |
| 25 | m_FFTSize = fftSize; |
| 26 | m_log2FFTSize = static_cast<int>(log2(fftSize)); |
| 27 | |
| 28 | // We only allow power of two |
| 29 | ASSERT(1UL << m_log2FFTSize == m_FFTSize); |
| 30 | |
| 31 | // Lazily create and share fftSetup with other frames |
| 32 | m_FFTSetup = fftSetupForSize(fftSize); |
| 33 | |
| 34 | // Setup frame data |
| 35 | m_frame.realp = m_realData.data(); |
| 36 | m_frame.imagp = m_imagData.data(); |
| 37 | } |
| 38 | |
| 39 | // Creates a blank/empty frame (interpolate() must later be called) |
| 40 | FFTFrame::FFTFrame() |