//
// FMODAudioEngine::channelForChannelID from 0x3eccaa to 0x3ecd18 (110 bytes)
//
// 22 xrefs:
// > FMODAudioEngine::stop @ 0x3ecd70
// > FMODAudioEngine::resumeSuspendedAudio @ 0x3ece42
// > FMODAudioEngine::stopAllMusic @ 0x3ecf6c
// > FMODAudioEngine::pauseAllMusic @ 0x3ecfea
// > FMODAudioEngine::resumeAllMusic @ 0x3ed010
// > FMODAudioEngine::channelForUniqueID @ 0x3ed434
// > FMODAudioEngine::startMusic @ 0x3ee59e
// > FMODAudioEngine::setMusicTimeMS @ 0x3eeaca
// > FMODAudioEngine::getMusicTimeMS @ 0x3eeb3a
// > FMODAudioEngine::getMusicLengthMS @ 0x3eeba6
// > FMODAudioEngine::setChannelVolume @ 0x3eedc2
// > FMODAudioEngine::setChannelVolume @ 0x3eede2
// > FMODAudioEngine::setChannelVolumeMod @ 0x3eeffa
// > FMODAudioEngine::setChannelVolumeMod @ 0x3ef01a
// > FMODAudioEngine::setChannelPitch @ 0x3ef0d4
// > FMODAudioEngine::getActiveMusicChannel @ 0x3ef4a2
// > FMODAudioEngine::stopAndRemoveMusic @ 0x3ef896
// > FMODAudioEngine::loadMusic @ 0x3efbf2
// > FMODAudioEngine::saveAudioState @ 0x3f0622
// > FMODAudioEngine::playEffectAdvanced @ 0x3f0cec
// > FMODAudioEngine::loadAudioState @ 0x3f148a
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x5b35f8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:10 +0000
//
_DWORD *__fastcall FMODAudioEngine::channelForChannelID(FMODAudioEngine *this, unsigned int a2)
{
unsigned int v3; // r5
unsigned int v5; // r6
unsigned int v6; // r10
_DWORD *result; // r0
_DWORD *i; // r4
unsigned int v9; // r0
int v10; // r1
unsigned int v11; // [sp+4h] [bp-4h] BYREF
v11 = a2;
v3 = *((_DWORD *)this + 193);
v11 = a2;
if ( !v3 )
return nullptr;
v5 = v3 - 1;
if ( ((v3 - 1) & v3) != 0 )
v6 = a2 % v3;
else
v6 = v5 & a2;
result = *(_DWORD **)(*((_DWORD *)this + 192) + 4 * v6);
if ( result )
{
for ( i = (_DWORD *)*result; i; i = (_DWORD *)*i )
{
v9 = i[1];
v10 = ((v3 - 1) & v3) != 0 ? v9 % v3 : v5 & v9;
if ( v10 != v6 )
break;
if ( i[2] == a2 )
return (_DWORD *)*std::unordered_map::operator[]((int)this + 768, &v11);
}
return nullptr;
}
return result;
}