summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;