GB Audio: Remove faulty optimization
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 Apr 2016 01:35:57 -0700
1 files changed,
1 insertions(+),
7 deletions(-)
jump to
M
src/gb/audio.c
→
src/gb/audio.c
@@ -594,13 +594,7 @@ int sampleRight = 0;
if (audio->ch4.envelope.dead != 2) { while (audio->nextCh4 <= 0) { - int32_t timing = _updateChannel4(&audio->ch4); - if (audio->nextCh4 < -timing) { - int32_t bound = timing * 16; - // Perform negative modulo to cap to 16 iterations - audio->nextCh4 = bound - (audio->nextCh4 - 1) % bound - 1; - } - audio->nextCh4 += timing; + audio->nextCh4 += _updateChannel4(&audio->ch4); } if (audio->nextCh4 < audio->nextEvent) { audio->nextEvent = audio->nextCh4;