aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-01 03:44:26 -0700
committerChris Robinson <[email protected]>2021-04-01 03:44:26 -0700
commite4570189211c3c0fef6b8c7a3cb1eae3a3d32cb3 (patch)
tree091ab324005bda2e3f245c3fa3c0b89792a7c97b /alc
parentf33edc3b30ee2975464b308f800f6918c0362283 (diff)
Avoid passing an array of pointers
Diffstat (limited to 'alc')
-rw-r--r--alc/voice.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/alc/voice.cpp b/alc/voice.cpp
index 7e761b29..891bc3dc 100644
--- a/alc/voice.cpp
+++ b/alc/voice.cpp
@@ -636,15 +636,9 @@ void Voice::mix(const State vstate, ALCcontext *Context, const uint SamplesToDo)
if(mDecoder)
{
- std::array<float*,4> samples{{mVoiceSamples[0].data() + MaxResamplerEdge,
- mVoiceSamples[1].data() + MaxResamplerEdge,
- mVoiceSamples[2].data() + MaxResamplerEdge,
- nullptr}};
- if(mVoiceSamples.size() > 3)
- samples[3] = mVoiceSamples[3].data() + MaxResamplerEdge;
const size_t srcOffset{(increment*DstBufferSize + DataPosFrac)>>MixerFracBits};
SrcBufferSize = SrcBufferSize - PostPadding + MaxResamplerEdge;
- mDecoder->decode(samples, SrcBufferSize, srcOffset);
+ mDecoder->decode(mVoiceSamples, MaxResamplerEdge, SrcBufferSize, srcOffset);
}
}