aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-05-23 00:02:04 -0700
committerChris Robinson <[email protected]>2017-05-23 00:35:22 -0700
commite6be113903e9a92734b1885b1506c8940940705f (patch)
tree52076c9082f76abede0d846939660dc82980b461 /Alc/ALc.c
parent49e5c535915f52b7888a884f4ed8925682336b28 (diff)
Add an option to dither 8- and 16-bit output
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 75c0e957..0861fbb8 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2080,6 +2080,8 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
UpdateClockBase(device);
+ device->DitherSeed = DITHER_RNG_SEED;
+
/*************************************************************************
* Update device format request if HRTF is requested
*/
@@ -4015,6 +4017,10 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
ERR("Unsupported ambi-format: %s\n", fmt);
}
+ device->DitherEnabled = GetConfigValueBool(
+ alstr_get_cstr(device->DeviceName), NULL, "dither", 1
+ );
+
if(DefaultEffect.type != AL_EFFECT_NULL)
{
device->DefaultSlot = (ALeffectslot*)device->_slot_mem;
@@ -4433,6 +4439,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
// Open the "backend"
V(device->Backend,open)("Loopback");
+ device->DitherEnabled = GetConfigValueBool(NULL, NULL, "dither", 1);
+
{
ALCdevice *head = ATOMIC_LOAD_SEQ(&DeviceList);
do {