diff options
author | Chris Robinson <[email protected]> | 2017-06-19 00:17:11 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-06-19 00:17:11 -0700 |
commit | e09468cdcab86de2d41d50b1d9530a970b83e65b (patch) | |
tree | a55bef93584a02a5e5aa4e30b402bf674851a8bd /Alc | |
parent | 36edd80073e2f009362b323a6cf8844cb65f35ec (diff) |
Trace if dithering is enabled
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; |