GBA Audio: Implement audio reset for channels A/B
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Jun 2015 00:24:52 -0700
3 files changed,
7 insertions(+),
2 deletions(-)
M
CHANGES
→
CHANGES
@@ -86,6 +86,7 @@ - GBA: More accurate cycle estimation for ROM prefetch and flash save chips
- ARM7: Reduce the size of the Thumb instruction table - GBA: Don't include GBACLIDebugger struct unless needed - SDL: Clean up GL context + - GBA Audio: Implement audio reset for channels A/B 0.2.1: (2015-05-13) Bugfixes:
M
README.md
→
README.md
@@ -104,7 +104,6 @@
- OBJ window for modes 3, 4 and 5 ([Bug #5](http://mgba.io/b/5)) - Mosaic for transformed OBJs ([Bug #9](http://mgba.io/b/9)) - BIOS call RegisterRamReset is partially stubbed out ([Bug #141](http://mgba.io/b/141)) -- Audio channel reset flags ([Bug #142](http://mgba.io/b/142)) - Game Pak prefetch ([Bug #195](http://mgba.io/b/195)) - BIOS call Stop, for entering sleep mode ([Bug #199](http://mgba.io/b/199))
M
src/gba/audio.c
→
src/gba/audio.c
@@ -456,7 +456,12 @@ audio->chATimer = GBARegisterSOUNDCNT_HIGetChATimer(value);
audio->chBRight = GBARegisterSOUNDCNT_HIGetChBRight(value); audio->chBLeft = GBARegisterSOUNDCNT_HIGetChBLeft(value); audio->chBTimer = GBARegisterSOUNDCNT_HIGetChBTimer(value); - // TODO: Implement channel reset + if (GBARegisterSOUNDCNT_HIIsChAReset(value)) { + CircleBufferClear(&audio->chA.fifo); + } + if (GBARegisterSOUNDCNT_HIIsChBReset(value)) { + CircleBufferClear(&audio->chB.fifo); + } } void GBAAudioWriteSOUNDCNT_X(struct GBAAudio* audio, uint16_t value) {