//
// FMODAudioEngine::fadeInMusic from 0x10013d1e8 to 0x10013d280 (152 bytes)
//
// 4 xrefs:
// > PlayLayer::startMusic @ 0x100119888
// > FMODAudioEngine::playMusic @ 0x10013d188
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x1001c0c3c
// > GJPathPage::unlockAnimationStep3 @ 0x1003bb2ec
//
// 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
//
void __fastcall FMODAudioEngine::fadeInMusic(FMODAudioEngine *a1, float a2, int a3)
{
FMOD::Channel *ActiveMusicChannel; // x0
FMOD::ChannelControl *v6; // x20
FMOD_RESULT v7; // w0
float v8; // s0
unsigned __int64 v9; // [xsp+8h] [xbp-28h] BYREF
ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);
if ( ActiveMusicChannel )
{
v6 = ActiveMusicChannel;
FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);
a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v6, nullptr, &v9);
v7 = FMOD::ChannelControl::addFadePoint(v6, v9, 0.0);
v8 = (float)v9;
a1->m_lastResult = v7;
a1->m_lastResult = FMOD::ChannelControl::addFadePoint(
v6,
(unsigned __int64)(float)(v8 + (float)((float)a1->m_sampleRate * a2)),
1.0);
}
}