//
// FMODAudioEngine::stopAndGetFade from 0x10013c65c to 0x10013c758 (252 bytes)
//
// 4 xrefs:
// > FMODAudioEngine::stopChannel_1 @ 0x10013c5d4
// > FMODAudioEngine::fadeInMusic @ 0x10013d218
// > FMODAudioEngine::fadeOutMusic @ 0x10013e864
// > FMODAudioEngine::fadeMusic @ 0x10013e90c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
float __fastcall FMODAudioEngine::stopAndGetFade(FMODAudioEngine *a1, FMOD::Channel *a2)
{
float v2; // s8
unsigned __int64 v6; // [xsp+0h] [xbp-50h] BYREF
int v7; // [xsp+Ch] [xbp-44h] BYREF
__int64 v8; // [xsp+10h] [xbp-40h] BYREF
__int64 v9; // [xsp+18h] [xbp-38h]
float v10[2]; // [xsp+20h] [xbp-30h] BYREF
v2 = 1.0;
if ( a2 )
{
v7 = 0;
a1->m_lastResult = sub_1004535A8(a2, &v7, 0, 0);
if ( v7 )
{
sub_10045350C(a2, 0, &v6);
a1->m_lastResult = FMOD::ChannelControl::getDSPClock(a2, nullptr, &v6);
a1->m_lastResult = sub_1004535A8(a2, &v7, &v8, v10);
sub_100453598(a2, v8, v9);
return v10[0] + (float)((float)((float)(v10[1] - v10[0]) / (float)(unsigned __int64)(v9 - v8)) * (float)(v6 - v8));
}
}
return v2;
}