aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-14 16:23:10 -0800
committerChris Robinson <[email protected]>2022-12-14 16:23:10 -0800
commit42090e93719748675384cc6ec9106fb39f869920 (patch)
tree70715c1514d2db153ca66fbc26ed30302eb54fd6 /alc
parent7c3f201f2625e37807c608e718b190cc48107b9c (diff)
Avoid manually specifying FFT template parameters
Diffstat (limited to 'alc')
-rw-r--r--alc/effects/convolution.cpp6
-rw-r--r--alc/effects/pshifter.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index 26ef6fd9..20510af2 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -332,7 +332,7 @@ void ConvolutionState::deviceUpdate(const DeviceBase *device, const Buffer &buff
done += todo;
std::fill(iter, fftbuffer.end(), std::complex<double>{});
- forward_fft<double>(fftbuffer);
+ forward_fft(al::as_span(fftbuffer));
filteriter = std::copy_n(fftbuffer.cbegin(), m, filteriter);
}
}
@@ -539,7 +539,7 @@ void ConvolutionState::process(const size_t samplesToDo,
*/
auto fftiter = std::copy_n(mInput.cbegin(), ConvolveUpdateSamples, mFftBuffer.begin());
std::fill(fftiter, mFftBuffer.end(), complex_f{});
- forward_fft<float>(mFftBuffer);
+ forward_fft(al::as_span(mFftBuffer));
std::copy_n(mFftBuffer.cbegin(), m, &mComplexData[curseg*m]);
@@ -575,7 +575,7 @@ void ConvolutionState::process(const size_t samplesToDo,
* second-half samples (and this output's second half is
* subsequently saved for next time).
*/
- inverse_fft<float>(mFftBuffer);
+ inverse_fft(al::as_span(mFftBuffer));
/* The iFFT'd response is scaled up by the number of bins, so apply
* the inverse to normalize the output.
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index f8409292..0156d777 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -184,7 +184,7 @@ void PshifterState::process(const size_t samplesToDo, const al::span<const Float
mFftBuffer[k] = mFIFO[src] * HannWindow[k];
for(size_t src{0u}, k{STFT_SIZE-mPos};src < mPos;++src,++k)
mFftBuffer[k] = mFIFO[src] * HannWindow[k];
- forward_fft<double>(mFftBuffer);
+ forward_fft(al::as_span(mFftBuffer));
/* Analyze the obtained data. Since the real FFT is symmetric, only
* STFT_HALF_SIZE+1 samples are needed.
@@ -243,7 +243,7 @@ void PshifterState::process(const size_t samplesToDo, const al::span<const Float
/* Apply an inverse FFT to get the time-domain siganl, and accumulate
* for the output with windowing.
*/
- inverse_fft<double>(mFftBuffer);
+ inverse_fft(al::as_span(mFftBuffer));
for(size_t dst{mPos}, k{0u};dst < STFT_SIZE;++dst,++k)
mOutputAccum[dst] += HannWindow[k]*mFftBuffer[k].real() * (4.0/OVERSAMP/STFT_SIZE);
for(size_t dst{0u}, k{STFT_SIZE-mPos};dst < mPos;++dst,++k)