//
// FMOD::Sound::setMusicSpeed from 0x1800aa030 to 0x1800aa149 (281 bytes)
//
// 3 xrefs:
// > FMOD_Sound_SetMusicSpeed @ 0x1800c67e9
// > ??> @ 0x180194348
// > ??> @ 0x1801fbe38
//
// 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::Sound::setMusicSpeed(__int64 a1)
{
int v1; // edi
unsigned int v2; // ebx
_DWORD *v4; // [rsp+30h] [rbp-138h] BYREF
__int64 v5; // [rsp+38h] [rbp-130h] BYREF
_BYTE v6[256]; // [rsp+40h] [rbp-128h] BYREF
v5 = 0;
v1 = a1;
v2 = sub_1800E1460(a1, &v4, &v5);
if ( !v2 )
{
if ( !v4[68] || v4[68] == 7 || v4[68] == 5 )
{
v2 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v4 + 352LL))(v4);
if ( !v2 )
goto LABEL_9;
}
else
{
v2 = 46;
}
}
if ( *((char *)off_1801AED20 + 16) < 0 )
{
sub_1800F2F20(v6, 256);
sub_1800B20E0(v2, 5, v1, (unsigned int)"Sound::setMusicSpeed", (__int64)v6);
}
LABEL_9:
if ( v5 )
sub_180102300(v5, 12);
return v2;
}