//
// FMODAudioEngine::fadeMusic from 0x6d7c94 to 0x6d7d90 (252 bytes)
//
// 3 xrefs:
// > SecretRewardsLayer::fadeInMusic @ 0xb9a1e8
// > SecretRewardsLayer::fadeInOutMusic @ 0xb9ab54
// > ??> @ 0xbc2d8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:51:31 +0000
//
__int64 __fastcall FMODAudioEngine::fadeMusic(FMODAudioEngine *this, float a2, int a3, float a4, float a5)
{
FMOD::Channel *ActiveMusicChannel; // x0
FMOD::ChannelControl *v10; // x19
unsigned __int64 v12; // [xsp+50h] [xbp+50h] BYREF
ActiveMusicChannel = (FMOD::Channel *)FMODAudioEngine::getActiveMusicChannel(this, a3);
v10 = ActiveMusicChannel;
if ( ActiveMusicChannel )
{
FMODAudioEngine::stopAndGetFade(this, ActiveMusicChannel);
*((_DWORD *)this + 134) = FMOD::ChannelControl::getDSPClock(v10, nullptr, &v12);
ERRCHECK_fn();
*((_DWORD *)this + 134) = FMOD::ChannelControl::addFadePoint(v10, v12, a4);
ERRCHECK_fn();
*((_DWORD *)this + 134) = FMOD::ChannelControl::addFadePoint(
v10,
(unsigned __int64)(float)((float)v12 + (float)((float)*((int *)this + 135) * a2)),
a5);
ERRCHECK_fn();
}
return _stack_chk_guard;
}