all repos — mgba @ a712216c2e248c9361615349144711b2e98c5f0d

mGBA Game Boy Advance Emulator

GB Audio: Small audio fixes
Jeffrey Pfau jeffrey@endrift.com
Sat, 06 Feb 2016 01:48:28 -0800
commit

a712216c2e248c9361615349144711b2e98c5f0d

parent

d3fa698c81eb372f9ab9e6843c8d571e6383a5de

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/gb/audio.csrc/gb/audio.c

@@ -121,6 +121,9 @@ audio->ch1.sweepStep = audio->ch1.time;

if (!audio->ch1.control.length) { audio->ch1.control.length = 64; } + if (audio->playingCh1 && audio->ch1.shift) { + audio->playingCh1 = _updateSweep(&audio->ch1); + } audio->nextEvent = 0; } }

@@ -360,7 +363,7 @@ audio->ch1.sample = sample * audio->ch1.envelope.currentVolume;

} } - if ((frame & 3) == 2) { + if (audio->ch1.sweepStep && (frame & 3) == 2) { --audio->ch1.sweepStep; if (audio->ch1.sweepStep == 0) { audio->playingCh1 = _updateSweep(&audio->ch1);