aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-06-19 00:17:11 -0700
committerChris Robinson <[email protected]>2017-06-19 00:17:11 -0700
commite09468cdcab86de2d41d50b1d9530a970b83e65b (patch)
treea55bef93584a02a5e5aa4e30b402bf674851a8bd
parent36edd80073e2f009362b323a6cf8844cb65f35ec (diff)
Trace if dithering is enabled
-rw-r--r--Alc/ALc.c10
1 files 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;