//
// FMODAudioEngine::fadeInMusic from 0x5b2d40 to 0x5b2e2c (236 bytes)
//
// 5 xrefs:
// > FMODAudioEngine::playMusic @ 0x5b6e48
// > PlayLayer::startMusic @ 0x5e45cc
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x918bd8
// > GJPathPage::unlockAnimationStep3 @ 0xa6ed20
// > ??> @ 0x58fb0
//
// 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 FMODAudioEngine::fadeInMusic(FMODAudioEngine *a1, float a2, int a3)
{
FMOD::Channel *ActiveMusicChannel; // x0
FMOD::ChannelControl *v6; // x19
unsigned __int64 v7; // [xsp+40h] [xbp+40h] BYREF
ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);
v6 = ActiveMusicChannel;
if ( ActiveMusicChannel )
{
FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);
a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v6, nullptr, &v7);
ERRCHECK_fn();
a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v6, v7, 0.0);
ERRCHECK_fn();
a1->m_lastResult = FMOD::ChannelControl::addFadePoint(
v6,
(unsigned __int64)(float)((float)v7 + (float)((float)a1->m_sampleRate * a2)),
1.0);
ERRCHECK_fn();
}
}