Browse code

Reduced instrument volume by 2/3 to help avoid clipping

Andrew Alderwick authored on 25/04/2021 17:05:37
Showing 1 changed files
... ...
@@ -54,8 +54,8 @@ apu_render(Apu *c, Sint16 *sample, Sint16 *end)
54 54
 			c->i %= c->len;
55 55
 		}
56 56
 		s = (Sint8)(c->addr[c->i]) * envelope(c, c->age++);
57
-		*sample++ += s * c->volume_l / 0x80;
58
-		*sample++ += s * c->volume_r / 0x80;
57
+		*sample++ += s * c->volume_l / 0x180;
58
+		*sample++ += s * c->volume_r / 0x180;
59 59
 	}
60 60
 }
61 61