//
// FMOD::Channel::getCurrentSound from 0x18009fbe0 to 0x18009fcbe (222 bytes)
//
// 3 xrefs:
// > FMOD_Channel_GetCurrentSound @ 0x1800c5509
// > ??> @ 0x180194348
// > ??> @ 0x1801fada0
//
// 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::Channel::getCurrentSound(__int64 a1, _QWORD *a2)
{
int v3; // esi
unsigned int v4; // ebx
__int64 v6; // [rsp+30h] [rbp-128h] BYREF
__int64 v7; // [rsp+38h] [rbp-120h] BYREF
_BYTE v8[256]; // [rsp+40h] [rbp-118h] BYREF
v6 = 0;
v3 = a1;
v4 = FMOD::ChannelI::validate(a1, &v7, &v6);
if ( v4 )
{
if ( a2 )
*a2 = 0;
}
else
{
v4 = sub_1800CD830(v7, a2);
if ( !v4 )
goto LABEL_7;
}
if ( *((char *)off_1801AED20 + 16) < 0 )
{
sub_1800F3230(v8, 256, a2);
sub_1800B20E0(v4, 2, v3, (unsigned int)"Channel::getCurrentSound", (__int64)v8);
}
LABEL_7:
if ( v6 )
sub_180102320();
return v4;
}