//
// FMODAudioEngine::getActiveMusicChannel from 0x10013a610 to 0x10013a678 (104 bytes)
//
// 8 xrefs:
// > PlayLayer::showCompleteEffect @ 0x10011a600
// > FMODAudioEngine::resumeMusic @ 0x10013a5f4
// > FMODAudioEngine::isMusicPlaying_1 @ 0x10013cdf4
// > FMODAudioEngine::playMusic @ 0x10013d1b0
// > FMODAudioEngine::fadeInMusic @ 0x10013d204
// > FMODAudioEngine::fadeOutMusic @ 0x10013e850
// > FMODAudioEngine::fadeMusic @ 0x10013e8f8
// > GJBaseGameLayer::processSongState @ 0x1002073ac
//
// 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
//
FMOD::Channel *__fastcall FMODAudioEngine::getActiveMusicChannel(FMODAudioEngine *a1, int a2)
{
FMOD::Channel *result; // x0
__int64 v4; // x0
int v5; // [xsp+0h] [xbp-20h] BYREF
char v6; // [xsp+7h] [xbp-19h] BYREF
int *v7; // [xsp+8h] [xbp-18h] BYREF
v5 = a2;
result = (FMOD::Channel *)sub_100018814(&a1->m_fmodMusic.__table_.__bucket_list_.__ptr_.__value_, &v5);
if ( result )
{
v7 = &v5;
v4 = sub_1001418C4(&a1->m_fmodMusic, &v5, &unk_100637FD3, &v7, &v6);
return FMODAudioEngine::channelForChannelID(a1, *(_DWORD *)(v4 + 24));
}
return result;
}