From e09468cdcab86de2d41d50b1d9530a970b83e65b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 19 Jun 2017 00:17:11 -0700 Subject: Trace if dithering is enabled --- Alc/ALc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Alc/ALc.c b/Alc/ALc.c index 6642c334..1121b631 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -2187,9 +2187,8 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) device->SourcesMax, device->NumMonoSources, device->NumStereoSources, device->AuxiliaryEffectSlotMax, device->NumAuxSends); - if(!GetConfigValueBool(alstr_get_cstr(device->DeviceName), NULL, "dither", 1)) - device->DitherDepth = 0.0f; - else + device->DitherDepth = 0.0f; + if(GetConfigValueBool(alstr_get_cstr(device->DeviceName), NULL, "dither", 1)) { ALint depth = 0; ConfigValueInt(alstr_get_cstr(device->DeviceName), NULL, "dither-depth", &depth); @@ -2215,6 +2214,11 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) depth = 24; device->DitherDepth = (depth > 0) ? powf(2.0f, (ALfloat)(depth-1)) : 0.0f; } + if(!(device->DitherDepth > 0.0f)) + TRACE("Dithering disabled\n"); + else + TRACE("Dithering enabled (%g-bit, %g)\n", log2f(device->DitherDepth)+1.0f, + device->DitherDepth); if(ConfigValueBool(alstr_get_cstr(device->DeviceName), NULL, "output-limiter", &val)) gainLimiter = val ? ALC_TRUE : ALC_FALSE; -- cgit v1.2.3