From ab1ad9955b4f81e442b7a7114ec1ce82572c10ed Mon Sep 17 00:00:00 2001 From: Michael Panzlaff Date: Wed, 25 Aug 2021 17:57:32 +0200 Subject: PR: implement review corrections 3 --- arm7/lib/src/SND_seq.c | 1 + arm7/lib/src/SND_util.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3