aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-03 23:26:33 -0700
committerChris Robinson <[email protected]>2019-07-03 23:26:33 -0700
commit949507c891035a4b14d6c06ab5bee1f56e6c24cb (patch)
treeec553fdae3517954c080e9d820e7e182b1abc021 /Alc/alc.cpp
parent9a51ca0a782764c97c5c393b799ff76b7b6fb75f (diff)
Use a span for RealMixParams
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index d61d8233..866bc4d9 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -1637,9 +1637,9 @@ static void alcSetError(ALCdevice *device, ALCenum errorCode)
static std::unique_ptr<Compressor> CreateDeviceLimiter(const ALCdevice *device, const ALfloat threshold)
{
- return CompressorInit(device->RealOut.NumChannels, device->Frequency,
- AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, 0.001f, 0.002f,
- 0.0f, 0.0f, threshold, INFINITY, 0.0f, 0.020f, 0.200f);
+ return CompressorInit(static_cast<ALuint>(device->RealOut.Buffer.size()), device->Frequency,
+ AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, 0.001f, 0.002f, 0.0f, 0.0f, threshold,
+ INFINITY, 0.0f, 0.020f, 0.200f);
}
/* UpdateClockBase
@@ -1907,8 +1907,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
device->Dry.NumChannels = 0;
std::fill(std::begin(device->NumChannelsPerOrder), std::end(device->NumChannelsPerOrder), 0u);
device->RealOut.ChannelIndex.fill(-1);
- device->RealOut.Buffer = nullptr;
- device->RealOut.NumChannels = 0;
+ device->RealOut.Buffer = {};
device->MixBuffer.clear();
device->MixBuffer.shrink_to_fit();