//
// FMODAudioEngine::playEffectAsync from 0x5b8928 to 0x5b8a74 (332 bytes)
//
// 2 xrefs:
// > CustomSFXWidget::onPlayback @ 0xa316a8
// > ??> @ 0x8a990
//
// 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
//
__int64 __fastcall FMODAudioEngine::playEffectAsync(__int64 a1, __int64 a2)
{
unsigned int v3; // w20
char *v4; // x0
unsigned int *v6; // x2
int v7; // w1
_DWORD *v8; // [xsp+80h] [xbp+40h] BYREF
sub_D18D28(&v8, a2);
v3 = FMODAudioEngine::playEffectAdvanced(
a1,
(const void **)&v8,
0,
0,
0,
0,
0,
0,
1.0,
0.0,
1.0,
0.0,
0.0,
0,
0,
0,
1,
0,
0,
0);
v4 = (char *)(v8 - 6);
if ( v8 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = v8 - 2;
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *(v8 - 2);
*(v8 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v4);
}
return v3;
}