//
// FMODAudioEngine::updateQueuedEffects from 0x100138fb4 to 0x1001390e0 (300 bytes)
//
// 1 xrefs:
// > FMODAudioEngine::update @ 0x100138e28
//
// 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::updateQueuedEffects(FMODAudioEngine *a1)
{
std::__hash_node_base, void *> *>::__next_pointer next; // x20
std::__hash_node_base, void *> *>::__next_pointer v4; // x21
std::__hash_node_base, void *> *> *v5; // x21
void *v6[2]; // [xsp+0h] [xbp-70h] BYREF
std::__hash_node_base, void *> *>::__next_pointer v7; // [xsp+10h] [xbp-60h]
void *__p[2]; // [xsp+20h] [xbp-50h] BYREF
std::__hash_node_base, void *> *>::__next_pointer v9; // [xsp+30h] [xbp-40h]
unsigned int v10; // [xsp+3Ch] [xbp-34h] BYREF
next = a1->m_soundPathToSound.__table_.__p1_.__value_.__next_;
if ( next )
{
do
{
while ( 1 )
{
a1->m_lastResult = FMOD::Sound::getOpenState(
(FMOD::Sound *)next[5].__next_,
(FMOD_OPENSTATE *)&v10,
nullptr,
nullptr,
nullptr);
if ( v10 <= 6 && ((1 << v10) & 0x45) != 0 )
break;
next = next->__next_;
if ( !next )
return;
}
v4 = next[5].__next_;
if ( SHIBYTE(next[4].__next_) < 0 )
{
sub_1000097D0(__p, next[2].__next_, (unsigned __int64)next[3].__next_);
}
else
{
*(_OWORD *)__p = *(_OWORD *)&next[2].__next_;
v9 = next[4].__next_;
}
FMODAudioEngine::storeEffect(a1, v4, __p);
if ( SHIBYTE(v9) < 0 )
operator delete(__p[0]);
if ( SHIBYTE(next[4].__next_) < 0 )
{
sub_1000097D0(v6, next[2].__next_, (unsigned __int64)next[3].__next_);
}
else
{
*(_OWORD *)v6 = *(_OWORD *)&next[2].__next_;
v7 = next[4].__next_;
}
FMODAudioEngine::queuedEffectFinishedLoading(a1, v6);
if ( SHIBYTE(v7) < 0 )
operator delete(v6[0]);
v5 = next->__next_;
sub_100141824(&a1->m_soundPathToSound, next);
next = v5;
}
while ( v5 );
}
}