diff options
author | Chris Robinson <[email protected]> | 2018-12-22 18:43:34 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-22 18:43:34 -0800 |
commit | 86caf2683e77098d4e9855ef2eaab88b9f90df60 (patch) | |
tree | 8737e8b7e5527a8664e67a25f182b254c3be1582 /Alc/effects | |
parent | 334b3a905a1a387d5fb5f74483a7520bb5d5449a (diff) |
Constify a parameter
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/autowah.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/chorus.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/compressor.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/dedicated.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/distortion.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/echo.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/equalizer.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/fshifter.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/modulator.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/null.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/pshifter.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/reverb.cpp | 4 |
12 files changed, 24 insertions, 24 deletions
diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp index 19c247a9..e034c610 100644 --- a/Alc/effects/autowah.cpp +++ b/Alc/effects/autowah.cpp @@ -68,14 +68,14 @@ struct ALautowahState final : public EffectState { alignas(16) ALfloat mBufferOut[BUFFERSIZE]; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALautowahState) }; -ALboolean ALautowahState::deviceUpdate(ALCdevice *UNUSED(device)) +ALboolean ALautowahState::deviceUpdate(const ALCdevice *UNUSED(device)) { /* (Re-)initializing parameters and clear the buffers. */ diff --git a/Alc/effects/chorus.cpp b/Alc/effects/chorus.cpp index e0878eb0..925cd09f 100644 --- a/Alc/effects/chorus.cpp +++ b/Alc/effects/chorus.cpp @@ -90,14 +90,14 @@ struct ChorusState final : public EffectState { ALfloat mFeedback{0.0f}; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ChorusState) }; -ALboolean ChorusState::deviceUpdate(ALCdevice *Device) +ALboolean ChorusState::deviceUpdate(const ALCdevice *Device) { const ALfloat max_delay = maxf(AL_CHORUS_MAX_DELAY, AL_FLANGER_MAX_DELAY); size_t maxlen; diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp index 31210264..d502be43 100644 --- a/Alc/effects/compressor.cpp +++ b/Alc/effects/compressor.cpp @@ -48,14 +48,14 @@ struct ALcompressorState final : public EffectState { ALfloat mEnvFollower{1.0f}; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALcompressorState) }; -ALboolean ALcompressorState::deviceUpdate(ALCdevice *device) +ALboolean ALcompressorState::deviceUpdate(const ALCdevice *device) { /* Number of samples to do a full attack and release (non-integer sample * counts are okay). diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index c0af33e1..fa550397 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -36,14 +36,14 @@ struct ALdedicatedState final : public EffectState { ALfloat mTargetGains[MAX_OUTPUT_CHANNELS]; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALdedicatedState) }; -ALboolean ALdedicatedState::deviceUpdate(ALCdevice *UNUSED(device)) +ALboolean ALdedicatedState::deviceUpdate(const ALCdevice *UNUSED(device)) { std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); return AL_TRUE; diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp index b3d339ad..58d05e8f 100644 --- a/Alc/effects/distortion.cpp +++ b/Alc/effects/distortion.cpp @@ -44,14 +44,14 @@ struct ALdistortionState final : public EffectState { ALfloat mBuffer[2][BUFFERSIZE]{}; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALdistortionState) }; -ALboolean ALdistortionState::deviceUpdate(ALCdevice *UNUSED(device)) +ALboolean ALdistortionState::deviceUpdate(const ALCdevice *UNUSED(device)) { mLowpass.clear(); mBandpass.clear(); diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp index 3604bed4..b9310193 100644 --- a/Alc/effects/echo.cpp +++ b/Alc/effects/echo.cpp @@ -56,14 +56,14 @@ struct ALechoState final : public EffectState { BiquadFilter mFilter; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALechoState) }; -ALboolean ALechoState::deviceUpdate(ALCdevice *Device) +ALboolean ALechoState::deviceUpdate(const ALCdevice *Device) { ALuint maxlen; diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index 2c46c2f3..a10316e8 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -90,14 +90,14 @@ struct ALequalizerState final : public EffectState { ALfloat mSampleBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE]{}; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALequalizerState) }; -ALboolean ALequalizerState::deviceUpdate(ALCdevice *UNUSED(device)) +ALboolean ALequalizerState::deviceUpdate(const ALCdevice *UNUSED(device)) { for(auto &e : mChans) { diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index 38fb5492..9b6d700c 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -81,14 +81,14 @@ struct ALfshifterState final : public EffectState { ALfloat mTargetGains[MAX_OUTPUT_CHANNELS]{}; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALfshifterState) }; -ALboolean ALfshifterState::deviceUpdate(ALCdevice *UNUSED(device)) +ALboolean ALfshifterState::deviceUpdate(const ALCdevice *UNUSED(device)) { /* (Re-)initializing parameters and clear the buffers. */ mCount = FIFO_LATENCY; diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp index bf584898..d686c362 100644 --- a/Alc/effects/modulator.cpp +++ b/Alc/effects/modulator.cpp @@ -88,14 +88,14 @@ struct ALmodulatorState final : public EffectState { } mChans[MAX_EFFECT_CHANNELS]; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALmodulatorState) }; -ALboolean ALmodulatorState::deviceUpdate(ALCdevice *UNUSED(device)) +ALboolean ALmodulatorState::deviceUpdate(const ALCdevice *UNUSED(device)) { for(auto &e : mChans) { diff --git a/Alc/effects/null.cpp b/Alc/effects/null.cpp index d28a6889..ba591565 100644 --- a/Alc/effects/null.cpp +++ b/Alc/effects/null.cpp @@ -15,7 +15,7 @@ struct ALnullState final : public EffectState { ALnullState(); ~ALnullState() override; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; @@ -40,7 +40,7 @@ ALnullState::~ALnullState() * initialization and any time the device parameters (eg. playback frequency, * format) have been changed. */ -ALboolean ALnullState::deviceUpdate(ALCdevice* UNUSED(device)) +ALboolean ALnullState::deviceUpdate(const ALCdevice* UNUSED(device)) { return AL_TRUE; } diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp index 3c375499..3825bfd5 100644 --- a/Alc/effects/pshifter.cpp +++ b/Alc/effects/pshifter.cpp @@ -143,14 +143,14 @@ struct ALpshifterState final : public EffectState { ALfloat mTargetGains[MAX_OUTPUT_CHANNELS]; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; DEF_NEWDEL(ALpshifterState) }; -ALboolean ALpshifterState::deviceUpdate(ALCdevice *device) +ALboolean ALpshifterState::deviceUpdate(const ALCdevice *device) { /* (Re-)initializing parameters and clear the buffers. */ mCount = FIFO_LATENCY; diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index 67945b27..cc0f3fb0 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -338,7 +338,7 @@ struct ReverbState final : public EffectState { alignas(16) ALfloat mMixBuffer[NUM_LINES][MAX_UPDATE_SAMPLES]{}; - ALboolean deviceUpdate(ALCdevice *device) override; + ALboolean deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], ALsizei numChannels) override; @@ -456,7 +456,7 @@ static ALboolean AllocLines(const ALuint frequency, ReverbState *State) return AL_TRUE; } -ALboolean ReverbState::deviceUpdate(ALCdevice *Device) +ALboolean ReverbState::deviceUpdate(const ALCdevice *Device) { const ALuint frequency{Device->Frequency}; |