diff options
author | Chris Robinson <[email protected]> | 2023-05-12 18:02:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-12 18:02:12 -0700 |
commit | e7ea579ca5f3c0da6cfe80ec9a7295bca60198aa (patch) | |
tree | 43e7e7d3ac1cbdbfd3705986238853eec72c272e /alc/effects | |
parent | 72f02418e505a192c0cc7b27cd7b3aa28a7a03ec (diff) |
Avoid using al::vector unnecessarily
Diffstat (limited to 'alc/effects')
-rw-r--r-- | alc/effects/chorus.cpp | 4 | ||||
-rw-r--r-- | alc/effects/echo.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp index 10ccf9f6..7c281aa5 100644 --- a/alc/effects/chorus.cpp +++ b/alc/effects/chorus.cpp @@ -25,6 +25,7 @@ #include <climits> #include <cstdlib> #include <iterator> +#include <vector> #include "alc/effects/base.h" #include "almalloc.h" @@ -41,7 +42,6 @@ #include "core/resampler_limits.h" #include "intrusive_ptr.h" #include "opthelpers.h" -#include "vector.h" namespace { @@ -49,7 +49,7 @@ namespace { using uint = unsigned int; struct ChorusState final : public EffectState { - al::vector<float,16> mDelayBuffer; + std::vector<float> mDelayBuffer; uint mOffset{0}; uint mLfoOffset{0}; diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp index a69529dc..7824c246 100644 --- a/alc/effects/echo.cpp +++ b/alc/effects/echo.cpp @@ -25,6 +25,7 @@ #include <cstdlib> #include <iterator> #include <tuple> +#include <vector> #include "alc/effects/base.h" #include "almalloc.h" @@ -39,7 +40,6 @@ #include "core/mixer.h" #include "intrusive_ptr.h" #include "opthelpers.h" -#include "vector.h" namespace { @@ -49,7 +49,7 @@ using uint = unsigned int; constexpr float LowpassFreqRef{5000.0f}; struct EchoState final : public EffectState { - al::vector<float,16> mSampleBuffer; + std::vector<float> mSampleBuffer; // The echo is two tap. The delay is the number of samples from before the // current offset @@ -87,7 +87,7 @@ void EchoState::deviceUpdate(const DeviceBase *Device, const BufferStorage*) const uint maxlen{NextPowerOf2(float2uint(EchoMaxDelay*frequency + 0.5f) + float2uint(EchoMaxLRDelay*frequency + 0.5f))}; if(maxlen != mSampleBuffer.size()) - al::vector<float,16>(maxlen).swap(mSampleBuffer); + decltype(mSampleBuffer)(maxlen).swap(mSampleBuffer); std::fill(mSampleBuffer.begin(), mSampleBuffer.end(), 0.0f); for(auto &e : mGains) |