diff options
author | Chris Robinson <[email protected]> | 2023-12-20 01:53:27 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-20 01:53:27 -0800 |
commit | aa6e04a5562052db172117043165ae999683b052 (patch) | |
tree | 11b36fabd9a542aca0f5ad234d365ce8067dd46d /alc/effects/pshifter.cpp | |
parent | 59c466077fd6f16af64afcc6260bb61aa4e632dc (diff) |
Ensure struct members are initialized
Diffstat (limited to 'alc/effects/pshifter.cpp')
-rw-r--r-- | alc/effects/pshifter.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index 24171082..9714510f 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -58,7 +58,7 @@ constexpr size_t StftStep{StftSize / OversampleFactor}; /* Define a Hann window, used to filter the STFT input and output. */ struct Windower { - alignas(16) std::array<float,StftSize> mData; + alignas(16) std::array<float,StftSize> mData{}; Windower() { @@ -82,29 +82,29 @@ struct FrequencyBin { struct PshifterState final : public EffectState { /* Effect parameters */ - size_t mCount; - size_t mPos; - uint mPitchShiftI; - float mPitchShift; + size_t mCount{}; + size_t mPos{}; + uint mPitchShiftI{}; + float mPitchShift{}; /* Effects buffers */ - std::array<float,StftSize> mFIFO; - std::array<float,StftHalfSize+1> mLastPhase; - std::array<float,StftHalfSize+1> mSumPhase; - std::array<float,StftSize> mOutputAccum; + std::array<float,StftSize> mFIFO{}; + std::array<float,StftHalfSize+1> mLastPhase{}; + std::array<float,StftHalfSize+1> mSumPhase{}; + std::array<float,StftSize> mOutputAccum{}; PFFFTSetup mFft; - alignas(16) std::array<float,StftSize> mFftBuffer; - alignas(16) std::array<float,StftSize> mFftWorkBuffer; + alignas(16) std::array<float,StftSize> mFftBuffer{}; + alignas(16) std::array<float,StftSize> mFftWorkBuffer{}; - std::array<FrequencyBin,StftHalfSize+1> mAnalysisBuffer; - std::array<FrequencyBin,StftHalfSize+1> mSynthesisBuffer; + std::array<FrequencyBin,StftHalfSize+1> mAnalysisBuffer{}; + std::array<FrequencyBin,StftHalfSize+1> mSynthesisBuffer{}; - alignas(16) FloatBufferLine mBufferOut; + alignas(16) FloatBufferLine mBufferOut{}; /* Effect gains for each output channel */ - std::array<float,MaxAmbiChannels> mCurrentGains; - std::array<float,MaxAmbiChannels> mTargetGains; + std::array<float,MaxAmbiChannels> mCurrentGains{}; + std::array<float,MaxAmbiChannels> mTargetGains{}; void deviceUpdate(const DeviceBase *device, const BufferStorage *buffer) override; |