summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Panzlaff <michael.panzlaff@fau.de>2021-08-25 17:57:32 +0200
committerMichael Panzlaff <michael.panzlaff@fau.de>2021-08-25 18:03:51 +0200
commitab1ad9955b4f81e442b7a7114ec1ce82572c10ed (patch)
treea6ab4099eb2174f63758eebcbb7da0aa6543e54b
parenta6e669f1da619f88d58839807e0c3a908bf6ced5 (diff)
PR: implement review corrections 3
-rw-r--r--arm7/lib/src/SND_seq.c1
-rw-r--r--arm7/lib/src/SND_util.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/arm7/lib/src/SND_seq.c b/arm7/lib/src/SND_seq.c
index d4f6b7b1..15b60596 100644
--- a/arm7/lib/src/SND_seq.c
+++ b/arm7/lib/src/SND_seq.c
@@ -765,6 +765,7 @@ static void TrackPlayNote(
u32 allowedChannels;
+ // get bitmask with allocatable channels based on channel type
switch (inst.type)
{
case SND_INST_PCM:
diff --git a/arm7/lib/src/SND_util.c b/arm7/lib/src/SND_util.c
index c9a98c3f..5c0b220b 100644
--- a/arm7/lib/src/SND_util.c
+++ b/arm7/lib/src/SND_util.c
@@ -36,7 +36,7 @@ u16 SND_CalcTimer(int timer, int pitch)
}
else if (shift < 32)
{
- // what ???
+ // clamp in case timer value overflows
u64 tmp = result & ~0uLL << (32 - shift);
if (tmp != 0)
return 0xFFFF;