//
// FMODAudioEngine::fadeInMusic from 0x1001ba090 to 0x1001ba128 (152 bytes)
//
// 3 xrefs:
// > PlayLayer::startMusic @ 0x100142720
// > FMODAudioEngine::playMusic @ 0x1001ba030
// > GJPathPage::unlockAnimationStep3 @ 0x100461fa4
//
// 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 11:00:11 +0000
//
__int64 *__fastcall FMODAudioEngine::fadeInMusic(__int64 a1, int a2, float a3)
{
__int64 *result; // x0
__int64 *v6; // x20
int v7; // w0
float v8; // s0
unsigned __int64 v9; // [xsp+8h] [xbp-28h] BYREF
result = FMODAudioEngine::getActiveMusicChannel(a1, a2);
if ( result )
{
v6 = result;
FMODAudioEngine::stopAndGetFade(a1, (__int64)result);
*(_DWORD *)(a1 + 536) = FMOD::ChannelControl::getDSPClock(v6, 0, &v9);
v7 = FMOD::ChannelControl::addFadePoint(v6, v9, 0.0);
v8 = (float)v9;
*(_DWORD *)(a1 + 536) = v7;
result = (__int64 *)FMOD::ChannelControl::addFadePoint(
v6,
(unsigned __int64)(float)(v8 + (float)((float)*(int *)(a1 + 540) * a3)),
1.0);
*(_DWORD *)(a1 + 536) = (_DWORD)result;
}
return result;
}