aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/echo.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-11-28 12:51:46 +0100
committerSven Gothel <[email protected]>2023-11-28 12:51:46 +0100
commit1aaf4f070011490bcece50394b9b32dfa593fd9e (patch)
tree17d68284e401a35eea3d3a574d986d446a60763a /alc/effects/echo.cpp
parent6e7cee4fa9a8af03f28ca26cd89f8357390dfc90 (diff)
parent571b546f35eead77ce109f8d4dd6c3de3199d573 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'alc/effects/echo.cpp')
-rw-r--r--alc/effects/echo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp
index a69529dc..714649c9 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)
@@ -118,8 +118,8 @@ void EchoState::update(const ContextBase *context, const EffectSlot *slot,
const auto coeffs1 = CalcAngleCoeffs( angle, 0.0f, 0.0f);
mOutTarget = target.Main->Buffer;
- ComputePanGains(target.Main, coeffs0.data(), slot->Gain, mGains[0].Target);
- ComputePanGains(target.Main, coeffs1.data(), slot->Gain, mGains[1].Target);
+ ComputePanGains(target.Main, coeffs0, slot->Gain, mGains[0].Target);
+ ComputePanGains(target.Main, coeffs1, slot->Gain, mGains[1].Target);
}
void EchoState::process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut)