aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2018-12-12 17:23:54 +0100
committerStapleButter <thetotalworm@gmail.com>2018-12-12 17:23:54 +0100
commit2c8f674318f65e95afa6dab828b3d224037dfb37 (patch)
treee5c367f51d3d46cb59025f0757d452959b2406a8
parent758bed93bc321e4909ee5a35cba349c233aa36dd (diff)
add ROM #3159 to romlist.bin
-rw-r--r--romlist.binbin114560 -> 114576 bytes
-rw-r--r--src/SPI.cpp1
2 files changed, 1 insertions, 0 deletions
diff --git a/romlist.bin b/romlist.bin
index f8705dc..9e88de6 100644
--- a/romlist.bin
+++ b/romlist.bin
Binary files differ
diff --git a/src/SPI.cpp b/src/SPI.cpp
index a354705..fb93520 100644
--- a/src/SPI.cpp
+++ b/src/SPI.cpp
@@ -542,6 +542,7 @@ void Write(u8 val, u32 hold)
// 560190 cycles per frame
u32 cyclepos = (u32)NDS::GetSysClockCycles(2);
u32 samplepos = (cyclepos * MicBufferLen) / 560190;
+ if (samplepos >= MicBufferLen) samplepos = MicBufferLen-1;
s16 sample = MicBuffer[samplepos];
// make it louder