//
// FMOD::System::getChannelsPlaying from 0x1800acf00 to 0x1800acff9 (249 bytes)
//
// 5 xrefs:
// > FMOD_System_GetChannelsPlaying @ 0x1800c6a99
// > ??> @ 0x180188770
// > ??> @ 0x180188780
// > ??> @ 0x180194348
// > ??> @ 0x1801fc2e8
//
// 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 FMOD::System::getChannelsPlaying(__int64 a1, __int64 a2, __int64 a3)
{
int v5; // r14d
unsigned int v6; // esi
__int64 result; // rax
int v8; // ebx
int v9; // eax
__int64 v10; // [rsp+30h] [rbp-148h] BYREF
_BYTE v11[256]; // [rsp+40h] [rbp-138h] BYREF
v5 = a1;
v6 = FMOD::SystemI::validate(a1, &v10, 0);
if ( v6 || (result = sub_1800E3FE0(v10, a2, a3), (v6 = result) != 0) )
{
if ( *((char *)off_1801AED20 + 16) < 0 )
{
v8 = sub_1800F3020(v11, 256, a2);
v9 = sub_1800F2F70(&v11[v8]);
sub_1800F3020(&v11[v9 + v8], (unsigned int)(256 - (v9 + v8)), a3);
sub_1800B20E0(v6, 1, v5, (unsigned int)"System::getChannelsPlaying", (__int64)v11);
}
return v6;
}
return result;
}