//
// FMODAudioEngine::pauseAllMusic from 0x1003e6a50 to 0x1003e6ad4 (132 bytes)
//
// 8 xrefs:
// > PlayLayer::destroyPlayer @ 0x1000ba413
// > PlayLayer::loadFromCheckpoint @ 0x1000bd39e
// > PlayLayer::resetLevel @ 0x1000be469
// > GJBaseGameLayer::pauseAudio @ 0x10015117e
// > GameManager::videoAdShowed @ 0x1003801fd
// > AppDelegate::applicationDidEnterBackground @ 0x10065c389
// > AppDelegate::pauseSound @ 0x10065c489
// > AppDelegate::checkSound @ 0x10065c6f7
//
// 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::pauseAllMusic(FMODAudioEngine *a1, bool a2)
{
std::__hash_node_base, void *> *>::__next_pointer next; // r14
FMOD::Channel *v3; // rax
FMOD::Channel *v4; // rax
next = a1->m_fmodMusic.__table_.__p1_.__value_.__next_;
if ( next )
{
if ( a2 )
{
do
{
v3 = FMODAudioEngine::channelForChannelID(a1, (int)next[3].__next_);
if ( v3 )
FMOD::ChannelControl::setPaused(v3, 1);
next = next->__next_;
}
while ( next );
}
else
{
do
{
if ( !BYTE1(next[8].__next_) )
{
v4 = FMODAudioEngine::channelForChannelID(a1, (int)next[3].__next_);
if ( v4 )
FMOD::ChannelControl::setPaused(v4, 1);
}
next = next->__next_;
}
while ( next );
}
}
}