games/nes: reduce volume, causes overflow and confuses ac97
This commit is contained in:
parent
96b5d96b90
commit
d63850570c
1 changed files with 3 additions and 2 deletions
|
@ -225,14 +225,15 @@ void
|
|||
audiosample(void)
|
||||
{
|
||||
double d;
|
||||
static int i;
|
||||
|
||||
if(sbufp == nil)
|
||||
return;
|
||||
d = 95.88 / (8128.0 / (0.01 + pulse(0) + pulse(1)) + 100);
|
||||
d += 159.79 / (1.0 / (0.01 + tri()/8227.0 + noise()/12241.0 + dmc()/22638.0) + 100.0);
|
||||
if(sbufp < sbuf + nelem(sbuf) - 1){
|
||||
*sbufp++ = d * 20000;
|
||||
*sbufp++ = d * 20000;
|
||||
*sbufp++ = d * 10000;
|
||||
*sbufp++ = d * 10000;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue