diff options
author | Chris Robinson <[email protected]> | 2023-05-05 06:46:00 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-05 06:46:00 -0700 |
commit | 3ec03cadd2b5059e54e5e9b8f4d506b4c6ce727d (patch) | |
tree | 623b8e96f8acca9d55fb96b74e8d832877b27451 /alc/effects | |
parent | c14ca5f3aa6da354440a60656062f6bc68d6fca6 (diff) |
Use deduction guides instead of helper functions for spans
Diffstat (limited to 'alc/effects')
-rw-r--r-- | alc/effects/convolution.cpp | 6 | ||||
-rw-r--r-- | alc/effects/pshifter.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp index 4ca31246..04b88f66 100644 --- a/alc/effects/convolution.cpp +++ b/alc/effects/convolution.cpp @@ -360,7 +360,7 @@ void ConvolutionState::deviceUpdate(const DeviceBase *device, const BufferStorag done += todo; std::fill(iter, fftbuffer.end(), std::complex<double>{}); - forward_fft(al::as_span(fftbuffer)); + forward_fft(al::span{fftbuffer}); filteriter = std::copy_n(fftbuffer.cbegin(), m, filteriter); } } @@ -562,7 +562,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(al::as_span(mFftBuffer)); + forward_fft(al::span{mFftBuffer}); std::copy_n(mFftBuffer.cbegin(), m, &mComplexData[curseg*m]); @@ -598,7 +598,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(al::as_span(mFftBuffer)); + inverse_fft(al::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 426a2264..3cec1df9 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -186,7 +186,7 @@ void PshifterState::process(const size_t samplesToDo, mFftBuffer[k] = mFIFO[src] * gWindow.mData[k]; for(size_t src{0u}, k{StftSize-mPos};src < mPos;++src,++k) mFftBuffer[k] = mFIFO[src] * gWindow.mData[k]; - forward_fft(al::as_span(mFftBuffer)); + forward_fft(al::span{mFftBuffer}); /* Analyze the obtained data. Since the real FFT is symmetric, only * StftHalfSize+1 samples are needed. @@ -274,7 +274,7 @@ void PshifterState::process(const size_t samplesToDo, /* Apply an inverse FFT to get the time-domain signal, and accumulate * for the output with windowing. */ - inverse_fft(al::as_span(mFftBuffer)); + inverse_fft(al::span{mFftBuffer}); static constexpr float scale{3.0f / OversampleFactor / StftSize}; for(size_t dst{mPos}, k{0u};dst < StftSize;++dst,++k) |