all repos — mgba @ 6d53c44422fad289cef0ed67bbebb25433c4e8bf

mGBA Game Boy Advance Emulator

GB Audio: Sample inactive channels (fixes #1455, fixes #1456)
Vicki Pfau vi@endrift.com
Sat, 22 Jun 2019 23:15:43 -0700
commit

6d53c44422fad289cef0ed67bbebb25433c4e8bf

parent

68fc62073d2d6705613439c81d278c3070f1fa96

2 files changed, 5 insertions(+), 4 deletions(-)

jump to
M CHANGESCHANGES

@@ -26,6 +26,7 @@ - GB I/O: Filter IE top bits properly (fixes mgba.io/i/1329)

- GBA Video: Fix wrapped sprite mosaic clamping (fixes mgba.io/i/1432) - GBA Memory: Fix STM to VRAM (fixes mgba.io/i/1430) - GB Audio: Only reset channel 3 sample in DMG mode + - GB Audio: Sample inactive channels (fixes mgba.io/i/1455, mgba.io/i/1456) Other fixes: - Qt: Fix some Qt display driver race conditions - Core: Improved lockstep driver reliability (Le Hoang Quyen)
M src/gb/audio.csrc/gb/audio.c

@@ -598,7 +598,7 @@ int dcOffset = audio->style == GB_AUDIO_GBA ? 0 : -0x8;

int sampleLeft = dcOffset; int sampleRight = dcOffset; - if (audio->playingCh1 && !audio->forceDisableCh[0]) { + if (!audio->forceDisableCh[0]) { if (audio->ch1Left) { sampleLeft += audio->ch1.sample; }

@@ -608,7 +608,7 @@ sampleRight += audio->ch1.sample;

} } - if (audio->playingCh2 && !audio->forceDisableCh[1]) { + if (!audio->forceDisableCh[1]) { if (audio->ch2Left) { sampleLeft += audio->ch2.sample; }

@@ -618,7 +618,7 @@ sampleRight += audio->ch2.sample;

} } - if (audio->playingCh3 && !audio->forceDisableCh[2]) { + if (!audio->forceDisableCh[2]) { if (audio->ch3Left) { sampleLeft += audio->ch3.sample; }

@@ -628,7 +628,7 @@ sampleRight += audio->ch3.sample;

} } - if (audio->playingCh4 && !audio->forceDisableCh[3]) { + if (!audio->forceDisableCh[3]) { int8_t sample = _coalesceNoiseChannel(&audio->ch4); if (audio->ch4Left) { sampleLeft += sample;