changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: games/gb: limit audio range to prevent clipping

changeset 4419: f332ec7f329e
parent 4418: cf348dd0fc31
child 4421: 86c3761d3518
author: aiju@phicode.de
date: Sat, 11 Apr 2015 16:07:15 +0200
files: sys/src/games/gb/apu.c
description: games/gb: limit audio range to prevent clipping
     1.1--- a/sys/src/games/gb/apu.c
     1.2+++ b/sys/src/games/gb/apu.c
     1.3@@ -270,8 +270,8 @@ sampletick(void *)
     1.4 	s[1] *= 1 + (cntl >> 4 & 7);
     1.5 	
     1.6 	if(sbufp < sbuf + nelem(sbuf)){
     1.7-		sbufp[0] = s[0] * 60;
     1.8-		sbufp[1] = s[1] * 60;
     1.9+		sbufp[0] = s[0] * 30;
    1.10+		sbufp[1] = s[1] * 30;
    1.11 		sbufp += 2;
    1.12 	}
    1.13 }