//
// FMODAudioEngine::fadeMusic from 0x3ef694 to 0x3ef74e (186 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::fadeInMusic @ 0x6ca5b8
// > SecretRewardsLayer::fadeInOutMusic @ 0x6cac02
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:47:12 +0000
//
void __fastcall FMODAudioEngine::fadeMusic(FMODAudioEngine *this, float a2, unsigned int a3, float a4, float a5)
{
FMOD::Channel *ActiveMusicChannel; // r0
FMOD::ChannelControl *v9; // r6
unsigned __int64 v10; // [sp+8h] [bp-10h] BYREF
ActiveMusicChannel = (FMOD::Channel *)FMODAudioEngine::getActiveMusicChannel(this, a3);
v9 = ActiveMusicChannel;
if ( ActiveMusicChannel )
{
FMODAudioEngine::stopAndGetFade(this, ActiveMusicChannel);
*((_DWORD *)this + 97) = FMOD::ChannelControl::getDSPClock(v9, nullptr, &v10);
ERRCHECK_fn();
*((_DWORD *)this + 97) = FMOD::ChannelControl::addFadePoint(v9, v10, a4);
ERRCHECK_fn();
*((_DWORD *)this + 97) = FMOD::ChannelControl::addFadePoint(
v9,
(unsigned __int64)(float)((float)v10 + (float)((float)*((int *)this + 98) * a2)),
a5);
ERRCHECK_fn();
}
}