diff --git a/src/m4a.c b/src/m4a.c index b8f9e21c11..2280fc74c8 100644 --- a/src/m4a.c +++ b/src/m4a.c @@ -643,28 +643,17 @@ void FadeOutBody(struct MusicPlayerInfo *mplayInfo) s32 i; struct MusicPlayerTrack *track; u16 fadeOV; -#ifdef NONMATCHING - u16 mask; -#else - register u16 mask asm("r2"); -#endif // NONMATCHING if (mplayInfo->fadeOI == 0) return; - - mplayInfo->fadeOC--; - mask = 0xFFFF; - - if (mplayInfo->fadeOC != 0) + if (--mplayInfo->fadeOC != 0) return; mplayInfo->fadeOC = mplayInfo->fadeOI; if (mplayInfo->fadeOV & FADE_IN) { - mplayInfo->fadeOV += (4 << FADE_VOL_SHIFT); - - if ((u16)(mplayInfo->fadeOV & mask) >= (64 << FADE_VOL_SHIFT)) + if ((u16)(mplayInfo->fadeOV += (4 << FADE_VOL_SHIFT)) >= (64 << FADE_VOL_SHIFT)) { mplayInfo->fadeOV = (64 << FADE_VOL_SHIFT); mplayInfo->fadeOI = 0; @@ -672,11 +661,8 @@ void FadeOutBody(struct MusicPlayerInfo *mplayInfo) } else { - mplayInfo->fadeOV -= (4 << FADE_VOL_SHIFT); - - if ((s16)(mplayInfo->fadeOV & mask) <= 0) + if ((s16)(mplayInfo->fadeOV -= (4 << FADE_VOL_SHIFT)) <= 0) { - for (i = mplayInfo->trackCount, track = mplayInfo->tracks; i > 0; i--, track++) { u32 val;