aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alu.cpp')
-rw-r--r--Alc/alu.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index b447fce8..b12559d7 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -140,14 +140,14 @@ void ProcessHrtf(ALCdevice *device, const ALsizei SamplesToDo)
ASSUME(lidx >= 0 && ridx >= 0);
DirectHrtfState *state{device->mHrtfState.get()};
- MixDirectHrtf(device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx],
- {device->Dry.Buffer, device->Dry.NumChannels}, device->HrtfAccumData, state, SamplesToDo);
+ MixDirectHrtf(device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx], device->Dry.Buffer,
+ device->HrtfAccumData, state, SamplesToDo);
}
void ProcessAmbiDec(ALCdevice *device, const ALsizei SamplesToDo)
{
BFormatDec *ambidec{device->AmbiDecoder.get()};
- ambidec->process(device->RealOut.Buffer, device->Dry.Buffer, SamplesToDo);
+ ambidec->process(device->RealOut.Buffer, device->Dry.Buffer.data(), SamplesToDo);
}
void ProcessUhj(ALCdevice *device, const ALsizei SamplesToDo)
@@ -160,14 +160,14 @@ void ProcessUhj(ALCdevice *device, const ALsizei SamplesToDo)
/* Encode to stereo-compatible 2-channel UHJ output. */
Uhj2Encoder *uhj2enc{device->Uhj_Encoder.get()};
uhj2enc->encode(device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx],
- device->Dry.Buffer, SamplesToDo);
+ device->Dry.Buffer.data(), SamplesToDo);
}
void ProcessBs2b(ALCdevice *device, const ALsizei SamplesToDo)
{
/* First, decode the ambisonic mix to the "real" output. */
BFormatDec *ambidec{device->AmbiDecoder.get()};
- ambidec->process(device->RealOut.Buffer, device->Dry.Buffer, SamplesToDo);
+ ambidec->process(device->RealOut.Buffer, device->Dry.Buffer.data(), SamplesToDo);
/* BS2B is stereo output only. */
const int lidx{device->RealOut.ChannelIndex[FrontLeft]};
@@ -811,7 +811,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat xpos, const ALfloat ypo
/* Special-case LFE */
if(chans[c].channel == LFE)
{
- if(Device->Dry.Buffer == Device->RealOut.Buffer.data())
+ if(Device->Dry.Buffer.data() == Device->RealOut.Buffer.data())
{
int idx = GetChannelIdxByName(Device->RealOut, chans[c].channel);
if(idx != -1) voice->mChans[c].mDryParams.Gains.Target[idx] = DryGain;
@@ -858,7 +858,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat xpos, const ALfloat ypo
/* Special-case LFE */
if(chans[c].channel == LFE)
{
- if(Device->Dry.Buffer == Device->RealOut.Buffer.data())
+ if(Device->Dry.Buffer.data() == Device->RealOut.Buffer.data())
{
int idx = GetChannelIdxByName(Device->RealOut, chans[c].channel);
if(idx != -1) voice->mChans[c].mDryParams.Gains.Target[idx] = DryGain;
@@ -936,7 +936,7 @@ void CalcNonAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, cons
const ALCdevice *Device{ALContext->Device};
ALeffectslot *SendSlots[MAX_SENDS];
- voice->mDirect.Buffer = {Device->Dry.Buffer, static_cast<size_t>(Device->Dry.NumChannels)};
+ voice->mDirect.Buffer = Device->Dry.Buffer;
for(ALsizei i{0};i < Device->NumAuxSends;i++)
{
SendSlots[i] = props->Send[i].Slot;
@@ -948,9 +948,7 @@ void CalcNonAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, cons
voice->mSend[i].Buffer = {};
}
else
- {
- voice->mSend[i].Buffer = {SendSlots[i]->Wet.Buffer, SendSlots[i]->Wet.NumChannels};
- }
+ voice->mSend[i].Buffer = SendSlots[i]->Wet.Buffer;
}
/* Calculate the stepping value */
@@ -994,7 +992,7 @@ void CalcAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, const A
const ALlistener &Listener = ALContext->Listener;
/* Set mixing buffers and get send parameters. */
- voice->mDirect.Buffer = {Device->Dry.Buffer, Device->Dry.NumChannels};
+ voice->mDirect.Buffer = Device->Dry.Buffer;
ALeffectslot *SendSlots[MAX_SENDS];
ALfloat RoomRolloff[MAX_SENDS];
ALfloat DecayDistance[MAX_SENDS];
@@ -1051,7 +1049,7 @@ void CalcAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, const A
if(!SendSlots[i])
voice->mSend[i].Buffer = {};
else
- voice->mSend[i].Buffer = {SendSlots[i]->Wet.Buffer, SendSlots[i]->Wet.NumChannels};
+ voice->mSend[i].Buffer = SendSlots[i]->Wet.Buffer;
}
/* Transform source to listener space (convert to head relative) */
@@ -1424,8 +1422,8 @@ void ProcessContext(ALCcontext *ctx, const ALsizei SamplesToDo)
[SamplesToDo](const ALeffectslot *slot) -> void
{
EffectState *state{slot->Params.mEffectState};
- state->process(SamplesToDo, slot->Wet.Buffer, slot->Wet.NumChannels,
- state->mOutTarget);
+ state->process(SamplesToDo, slot->Wet.Buffer.data(),
+ static_cast<ALsizei>(slot->Wet.Buffer.size()), state->mOutTarget);
}
);
}