From de53a6c95f1fd06235ef3da36f2d94d2265a22f3 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Sun, 25 Apr 2021 18:05:37 +0100 Subject: [PATCH] Reduced instrument volume by 2/3 to help avoid clipping --- src/apu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apu.c b/src/apu.c index d79ac4b..c53d616 100644 --- a/src/apu.c +++ b/src/apu.c @@ -54,8 +54,8 @@ apu_render(Apu *c, Sint16 *sample, Sint16 *end) c->i %= c->len; } s = (Sint8)(c->addr[c->i]) * envelope(c, c->age++); - *sample++ += s * c->volume_l / 0x80; - *sample++ += s * c->volume_r / 0x80; + *sample++ += s * c->volume_l / 0x180; + *sample++ += s * c->volume_r / 0x180; } }