diff options
author | Chris Robinson <[email protected]> | 2019-07-04 15:02:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-07-04 15:02:12 -0700 |
commit | 3fe5ef272f436db82beeeee3ad123029e4d219b6 (patch) | |
tree | d7f79f3e99ec15bc8474050c922f227e888f24bd /Alc/effects | |
parent | 729ffe02d6ab05dc8c62e8332ef1878bbfbdf756 (diff) |
Use a span for MixParams
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/autowah.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/chorus.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/compressor.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/dedicated.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/distortion.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/echo.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/equalizer.cpp | 6 | ||||
-rw-r--r-- | Alc/effects/fshifter.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/modulator.cpp | 6 | ||||
-rw-r--r-- | Alc/effects/pshifter.cpp | 2 | ||||
-rw-r--r-- | Alc/effects/reverb.cpp | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp index 90af6134..f1160804 100644 --- a/Alc/effects/autowah.cpp +++ b/Alc/effects/autowah.cpp @@ -119,8 +119,8 @@ void ALautowahState::update(const ALCcontext *context, const ALeffectslot *slot, mFreqMinNorm = MIN_FREQ / device->Frequency; mBandwidthNorm = (MAX_FREQ-MIN_FREQ) / device->Frequency; - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; - for(ALuint i{0u};i < slot->Wet.NumChannels;++i) + mOutTarget = target.Main->Buffer; + for(size_t i{0u};i < slot->Wet.Buffer.size();++i) { auto coeffs = GetAmbiIdentityRow(i); ComputePanGains(target.Main, coeffs.data(), slot->Params.Gain, mChans[i].TargetGains); diff --git a/Alc/effects/chorus.cpp b/Alc/effects/chorus.cpp index b77c3439..a2a34008 100644 --- a/Alc/effects/chorus.cpp +++ b/Alc/effects/chorus.cpp @@ -159,7 +159,7 @@ void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, co CalcDirectionCoeffs({-1.0f, 0.0f, 0.0f}, 0.0f, coeffs[0]); CalcDirectionCoeffs({ 1.0f, 0.0f, 0.0f}, 0.0f, coeffs[1]); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; ComputePanGains(target.Main, coeffs[0], Slot->Params.Gain, mGains[0].Target); ComputePanGains(target.Main, coeffs[1], Slot->Params.Gain, mGains[1].Target); diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp index 883488cb..542ef684 100644 --- a/Alc/effects/compressor.cpp +++ b/Alc/effects/compressor.cpp @@ -78,8 +78,8 @@ void CompressorState::update(const ALCcontext* UNUSED(context), const ALeffectsl { mEnabled = props->Compressor.OnOff; - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; - for(ALuint i{0u};i < slot->Wet.NumChannels;++i) + mOutTarget = target.Main->Buffer; + for(size_t i{0u};i < slot->Wet.Buffer.size();++i) { auto coeffs = GetAmbiIdentityRow(i); ComputePanGains(target.Main, coeffs.data(), slot->Params.Gain, mGain[i]); diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index 12040af9..b5fdb626 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -81,7 +81,7 @@ void DedicatedState::update(const ALCcontext* UNUSED(context), const ALeffectslo ALfloat coeffs[MAX_AMBI_CHANNELS]; CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; ComputePanGains(target.Main, coeffs, Gain, mTargetGains); } } diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp index 3b8b73b7..a58ac5a6 100644 --- a/Alc/effects/distortion.cpp +++ b/Alc/effects/distortion.cpp @@ -90,7 +90,7 @@ void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot ALfloat coeffs[MAX_AMBI_CHANNELS]; CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; ComputePanGains(target.Main, coeffs, slot->Params.Gain*props->Distortion.Gain, mGain); } diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp index 594d2a7c..0211520b 100644 --- a/Alc/effects/echo.cpp +++ b/Alc/effects/echo.cpp @@ -113,7 +113,7 @@ void EchoState::update(const ALCcontext *context, const ALeffectslot *slot, cons CalcAngleCoeffs(-angle, 0.0f, 0.0f, coeffs[0]); CalcAngleCoeffs( angle, 0.0f, 0.0f, coeffs[1]); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; ComputePanGains(target.Main, coeffs[0], slot->Params.Gain, mGains[0].Target); ComputePanGains(target.Main, coeffs[1], slot->Params.Gain, mGains[1].Target); } diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index 14013aad..995f03df 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -141,7 +141,7 @@ void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, BiquadFilter::rcpQFromSlope(gain, 0.75f)); /* Copy the filter coefficients for the other input channels. */ - for(ALuint i{1u};i < slot->Wet.NumChannels;++i) + for(size_t i{1u};i < slot->Wet.Buffer.size();++i) { mChans[i].filter[0].copyParamsFrom(mChans[0].filter[0]); mChans[i].filter[1].copyParamsFrom(mChans[0].filter[1]); @@ -149,8 +149,8 @@ void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, mChans[i].filter[3].copyParamsFrom(mChans[0].filter[3]); } - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; - for(ALuint i{0u};i < slot->Wet.NumChannels;++i) + mOutTarget = target.Main->Buffer; + for(size_t i{0u};i < slot->Wet.Buffer.size();++i) { auto coeffs = GetAmbiIdentityRow(i); ComputePanGains(target.Main, coeffs.data(), slot->Params.Gain, mChans[i].TargetGains); diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index 0bbcc859..6378db89 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -133,7 +133,7 @@ void FshifterState::update(const ALCcontext *context, const ALeffectslot *slot, ALfloat coeffs[MAX_AMBI_CHANNELS]; CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; ComputePanGains(target.Main, coeffs, slot->Params.Gain, mTargetGains); } diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp index 12974faa..46d17d1c 100644 --- a/Alc/effects/modulator.cpp +++ b/Alc/effects/modulator.cpp @@ -129,11 +129,11 @@ void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot, /* Bandwidth value is constant in octaves. */ mChans[0].Filter.setParams(BiquadType::HighPass, 1.0f, f0norm, BiquadFilter::rcpQFromBandwidth(f0norm, 0.75f)); - for(ALuint i{1u};i < slot->Wet.NumChannels;++i) + for(size_t i{1u};i < slot->Wet.Buffer.size();++i) mChans[i].Filter.copyParamsFrom(mChans[0].Filter); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; - for(ALuint i{0u};i < slot->Wet.NumChannels;++i) + mOutTarget = target.Main->Buffer; + for(size_t i{0u};i < slot->Wet.Buffer.size();++i) { auto coeffs = GetAmbiIdentityRow(i); ComputePanGains(target.Main, coeffs.data(), slot->Params.Gain, mChans[i].TargetGains); diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp index 619bde34..5a1e3817 100644 --- a/Alc/effects/pshifter.cpp +++ b/Alc/effects/pshifter.cpp @@ -192,7 +192,7 @@ void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot ALfloat coeffs[MAX_AMBI_CHANNELS]; CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs); - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; ComputePanGains(target.Main, coeffs, slot->Params.Gain, mTargetGains); } diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index da8be835..01f5c476 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -889,7 +889,7 @@ void ReverbState::update3DPanning(const ALfloat *ReflectionsPan, const ALfloat * const alu::Matrix earlymat{GetTransformFromVector(ReflectionsPan)}; const alu::Matrix latemat{GetTransformFromVector(LateReverbPan)}; - mOutTarget = {target.Main->Buffer, target.Main->NumChannels}; + mOutTarget = target.Main->Buffer; for(ALsizei i{0};i < NUM_LINES;i++) { const ALfloat coeffs[MAX_AMBI_CHANNELS]{earlymat[0][i], earlymat[1][i], earlymat[2][i], |