aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
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();