diff options
author | Chris Robinson <[email protected]> | 2023-12-11 15:08:12 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-11 15:08:12 -0800 |
commit | ec40e4fefef954544c25285bfeae4a44c1134a44 (patch) | |
tree | 72b55e01fd50bed966db533713f998cf06815172 /alc/effects/pshifter.cpp | |
parent | a28bf538afabca45298a43e5d2acf3e6149a2c2c (diff) |
Finish cleanup for effects
Diffstat (limited to 'alc/effects/pshifter.cpp')
-rw-r--r-- | alc/effects/pshifter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index 871e866a..c7d662c7 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -103,8 +103,8 @@ struct PshifterState final : public EffectState { alignas(16) FloatBufferLine mBufferOut; /* Effect gains for each output channel */ - float mCurrentGains[MaxAmbiChannels]; - float mTargetGains[MaxAmbiChannels]; + std::array<float,MaxAmbiChannels> mCurrentGains; + std::array<float,MaxAmbiChannels> mTargetGains; void deviceUpdate(const DeviceBase *device, const BufferStorage *buffer) override; @@ -132,8 +132,8 @@ void PshifterState::deviceUpdate(const DeviceBase*, const BufferStorage*) mAnalysisBuffer.fill(FrequencyBin{}); mSynthesisBuffer.fill(FrequencyBin{}); - std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); - std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); + mCurrentGains.fill(0.0f); + mTargetGains.fill(0.0f); if(!mFft) mFft = PFFFTSetup{StftSize, PFFFT_REAL}; @@ -305,8 +305,8 @@ void PshifterState::process(const size_t samplesToDo, } /* Now, mix the processed sound data to the output. */ - MixSamples({mBufferOut.data(), samplesToDo}, samplesOut, mCurrentGains, mTargetGains, - maxz(samplesToDo, 512), 0); + MixSamples({mBufferOut.data(), samplesToDo}, samplesOut, mCurrentGains.data(), + mTargetGains.data(), maxz(samplesToDo, 512), 0); } |