aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-26 12:33:00 -0800
committerChris Robinson <[email protected]>2020-12-26 12:33:00 -0800
commit507cbfa0271e6183a06c5b2eec3465bc37a108e5 (patch)
treeedcb87473a70ea6b57ff01a400b1adfd149b9a2f /alc/effects
parent54719de13235f6ea216e8d200661027c047bd283 (diff)
Combine EffectState::deviceUpdate with setBuffer
Diffstat (limited to 'alc/effects')
-rw-r--r--alc/effects/autowah.cpp4
-rw-r--r--alc/effects/base.h3
-rw-r--r--alc/effects/chorus.cpp4
-rw-r--r--alc/effects/compressor.cpp4
-rw-r--r--alc/effects/convolution.cpp9
-rw-r--r--alc/effects/dedicated.cpp4
-rw-r--r--alc/effects/distortion.cpp4
-rw-r--r--alc/effects/echo.cpp4
-rw-r--r--alc/effects/equalizer.cpp4
-rw-r--r--alc/effects/fshifter.cpp4
-rw-r--r--alc/effects/modulator.cpp4
-rw-r--r--alc/effects/null.cpp4
-rw-r--r--alc/effects/pshifter.cpp4
-rw-r--r--alc/effects/reverb.cpp4
-rw-r--r--alc/effects/vmorpher.cpp4
15 files changed, 29 insertions, 35 deletions
diff --git a/alc/effects/autowah.cpp b/alc/effects/autowah.cpp
index a64a93db..154c33ff 100644
--- a/alc/effects/autowah.cpp
+++ b/alc/effects/autowah.cpp
@@ -69,7 +69,7 @@ struct AutowahState final : public EffectState {
alignas(16) float mBufferOut[BufferLineSize];
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -78,7 +78,7 @@ struct AutowahState final : public EffectState {
DEF_NEWDEL(AutowahState)
};
-void AutowahState::deviceUpdate(const ALCdevice*)
+void AutowahState::deviceUpdate(const ALCdevice*, const BufferStorage* /*buffer*/)
{
/* (Re-)initializing parameters and clear the buffers. */
diff --git a/alc/effects/base.h b/alc/effects/base.h
index fe595797..8fa22bb5 100644
--- a/alc/effects/base.h
+++ b/alc/effects/base.h
@@ -169,8 +169,7 @@ struct EffectState : public al::intrusive_ref<EffectState> {
virtual ~EffectState() = default;
- virtual void deviceUpdate(const ALCdevice *device) = 0;
- virtual void setBuffer(const ALCdevice* /*device*/, const BufferStorage* /*buffer*/) { }
+ virtual void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) = 0;
virtual void update(const ALCcontext *context, const EffectSlot *slot,
const EffectProps *props, const EffectTarget target) = 0;
virtual void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp
index bc4a1177..091f6b40 100644
--- a/alc/effects/chorus.cpp
+++ b/alc/effects/chorus.cpp
@@ -68,7 +68,7 @@ struct ChorusState final : public EffectState {
void getTriangleDelays(uint (*delays)[MAX_UPDATE_SAMPLES], const size_t todo);
void getSinusoidDelays(uint (*delays)[MAX_UPDATE_SAMPLES], const size_t todo);
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -77,7 +77,7 @@ struct ChorusState final : public EffectState {
DEF_NEWDEL(ChorusState)
};
-void ChorusState::deviceUpdate(const ALCdevice *Device)
+void ChorusState::deviceUpdate(const ALCdevice *Device, const BufferStorage* /*buffer*/)
{
constexpr float max_delay{maxf(AL_CHORUS_MAX_DELAY, AL_FLANGER_MAX_DELAY)};
diff --git a/alc/effects/compressor.cpp b/alc/effects/compressor.cpp
index ddffc790..8d65eedb 100644
--- a/alc/effects/compressor.cpp
+++ b/alc/effects/compressor.cpp
@@ -49,7 +49,7 @@ struct CompressorState final : public EffectState {
float mEnvFollower{1.0f};
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -58,7 +58,7 @@ struct CompressorState final : public EffectState {
DEF_NEWDEL(CompressorState)
};
-void CompressorState::deviceUpdate(const ALCdevice *device)
+void CompressorState::deviceUpdate(const ALCdevice *device, const BufferStorage* /*buffer*/)
{
/* Number of samples to do a full attack and release (non-integer sample
* counts are okay).
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index c072653d..79a63a38 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -174,8 +174,7 @@ struct ConvolutionState final : public EffectState {
void (ConvolutionState::*mMix)(const al::span<FloatBufferLine>,const size_t)
{&ConvolutionState::NormalMix};
- void deviceUpdate(const ALCdevice *device) override;
- void setBuffer(const ALCdevice *device, const BufferStorage *buffer) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -204,11 +203,7 @@ void ConvolutionState::UpsampleMix(const al::span<FloatBufferLine> samplesOut,
}
-void ConvolutionState::deviceUpdate(const ALCdevice* /*device*/)
-{
-}
-
-void ConvolutionState::setBuffer(const ALCdevice *device, const BufferStorage *buffer)
+void ConvolutionState::deviceUpdate(const ALCdevice *device, const BufferStorage *buffer)
{
constexpr uint MaxConvolveAmbiOrder{1u};
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp
index e71f75f0..cf435357 100644
--- a/alc/effects/dedicated.cpp
+++ b/alc/effects/dedicated.cpp
@@ -37,7 +37,7 @@ struct DedicatedState final : public EffectState {
float mTargetGains[MAX_OUTPUT_CHANNELS];
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -46,7 +46,7 @@ struct DedicatedState final : public EffectState {
DEF_NEWDEL(DedicatedState)
};
-void DedicatedState::deviceUpdate(const ALCdevice*)
+void DedicatedState::deviceUpdate(const ALCdevice*, const BufferStorage*)
{
std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f);
}
diff --git a/alc/effects/distortion.cpp b/alc/effects/distortion.cpp
index 65f8977b..8123f92f 100644
--- a/alc/effects/distortion.cpp
+++ b/alc/effects/distortion.cpp
@@ -45,7 +45,7 @@ struct DistortionState final : public EffectState {
float mBuffer[2][BufferLineSize]{};
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -54,7 +54,7 @@ struct DistortionState final : public EffectState {
DEF_NEWDEL(DistortionState)
};
-void DistortionState::deviceUpdate(const ALCdevice*)
+void DistortionState::deviceUpdate(const ALCdevice*, const BufferStorage*)
{
mLowpass.clear();
mBandpass.clear();
diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp
index 56e39f73..fc33c853 100644
--- a/alc/effects/echo.cpp
+++ b/alc/effects/echo.cpp
@@ -57,7 +57,7 @@ struct EchoState final : public EffectState {
alignas(16) float mTempBuffer[2][BufferLineSize];
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -66,7 +66,7 @@ struct EchoState final : public EffectState {
DEF_NEWDEL(EchoState)
};
-void EchoState::deviceUpdate(const ALCdevice *Device)
+void EchoState::deviceUpdate(const ALCdevice *Device, const BufferStorage* /*buffer*/)
{
const auto frequency = static_cast<float>(Device->Frequency);
diff --git a/alc/effects/equalizer.cpp b/alc/effects/equalizer.cpp
index e4544e49..66db207a 100644
--- a/alc/effects/equalizer.cpp
+++ b/alc/effects/equalizer.cpp
@@ -90,7 +90,7 @@ struct EqualizerState final : public EffectState {
FloatBufferLine mSampleBuffer{};
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -99,7 +99,7 @@ struct EqualizerState final : public EffectState {
DEF_NEWDEL(EqualizerState)
};
-void EqualizerState::deviceUpdate(const ALCdevice*)
+void EqualizerState::deviceUpdate(const ALCdevice*, const BufferStorage*)
{
for(auto &e : mChans)
{
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp
index 0af77fd8..630b8e1d 100644
--- a/alc/effects/fshifter.cpp
+++ b/alc/effects/fshifter.cpp
@@ -81,7 +81,7 @@ struct FshifterState final : public EffectState {
} mGains[2];
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -90,7 +90,7 @@ struct FshifterState final : public EffectState {
DEF_NEWDEL(FshifterState)
};
-void FshifterState::deviceUpdate(const ALCdevice*)
+void FshifterState::deviceUpdate(const ALCdevice*, const BufferStorage*)
{
/* (Re-)initializing parameters and clear the buffers. */
mCount = FIFO_LATENCY;
diff --git a/alc/effects/modulator.cpp b/alc/effects/modulator.cpp
index f45018e6..2c8bbb94 100644
--- a/alc/effects/modulator.cpp
+++ b/alc/effects/modulator.cpp
@@ -81,7 +81,7 @@ struct ModulatorState final : public EffectState {
} mChans[MaxAmbiChannels];
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -90,7 +90,7 @@ struct ModulatorState final : public EffectState {
DEF_NEWDEL(ModulatorState)
};
-void ModulatorState::deviceUpdate(const ALCdevice*)
+void ModulatorState::deviceUpdate(const ALCdevice*, const BufferStorage*)
{
for(auto &e : mChans)
{
diff --git a/alc/effects/null.cpp b/alc/effects/null.cpp
index 71544441..2d141e4e 100644
--- a/alc/effects/null.cpp
+++ b/alc/effects/null.cpp
@@ -15,7 +15,7 @@ struct NullState final : public EffectState {
NullState();
~NullState() override;
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -39,7 +39,7 @@ NullState::~NullState() = default;
* format) have been changed. Will always be followed by a call to the update
* method, if successful.
*/
-void NullState::deviceUpdate(const ALCdevice* /*device*/)
+void NullState::deviceUpdate(const ALCdevice* /*device*/, const BufferStorage* /*buffer*/)
{
}
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index dda61ddc..0c8bdefc 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -91,7 +91,7 @@ struct PshifterState final : public EffectState {
float mTargetGains[MAX_OUTPUT_CHANNELS];
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -100,7 +100,7 @@ struct PshifterState final : public EffectState {
DEF_NEWDEL(PshifterState)
};
-void PshifterState::deviceUpdate(const ALCdevice* /*device*/)
+void PshifterState::deviceUpdate(const ALCdevice* /*device*/, const BufferStorage* /*buffer*/)
{
/* (Re-)initializing parameters and clear the buffers. */
mCount = FIFO_LATENCY;
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 2bf09bef..220c3bee 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -527,7 +527,7 @@ struct ReverbState final : public EffectState {
void lateFaded(const size_t offset, const size_t todo, const float fade,
const float fadeStep);
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -607,7 +607,7 @@ void ReverbState::allocLines(const float frequency)
mLate.Delay.realizeLineOffset(mSampleBuffer.data());
}
-void ReverbState::deviceUpdate(const ALCdevice *device)
+void ReverbState::deviceUpdate(const ALCdevice *device, const BufferStorage* /*buffer*/)
{
const auto frequency = static_cast<float>(device->Frequency);
diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp
index aade1ea0..32c4b811 100644
--- a/alc/effects/vmorpher.cpp
+++ b/alc/effects/vmorpher.cpp
@@ -136,7 +136,7 @@ struct VmorpherState final : public EffectState {
alignas(16) float mSampleBufferB[MAX_UPDATE_SAMPLES]{};
alignas(16) float mLfo[MAX_UPDATE_SAMPLES]{};
- void deviceUpdate(const ALCdevice *device) override;
+ void deviceUpdate(const ALCdevice *device, const BufferStorage *buffer) override;
void update(const ALCcontext *context, const EffectSlot *slot, const EffectProps *props,
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
@@ -200,7 +200,7 @@ std::array<FormantFilter,4> VmorpherState::getFiltersByPhoneme(VMorpherPhenome p
}
-void VmorpherState::deviceUpdate(const ALCdevice* /*device*/)
+void VmorpherState::deviceUpdate(const ALCdevice* /*device*/, const BufferStorage* /*buffer*/)
{
for(auto &e : mChans)
{