//
// FMODAudioEngine::loadAndPlayMusic from 0x10013d008 to 0x10013d0c4 (188 bytes)
//
// 3 xrefs:
// > CreateGuidelinesLayer::playMusic @ 0x10007d570
// > FindBPMLayer::playMusic @ 0x10007e300
// > SongOptionsLayer::onPlayback @ 0x100145a60
//
// 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::loadAndPlayMusic(FMODAudioEngine *a1, __int64 a2, unsigned int a3, __int64 a4)
{
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
__int64 v8; // [xsp+10h] [xbp-30h]
if ( *(char *)(a2 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a2, *(_QWORD *)(a2 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a2;
v8 = *(_QWORD *)(a2 + 16);
}
FMODAudioEngine::loadMusic((__int64)a1, (__int128 *)__p, 0, a4, 0, 0, 1.0, 0.0, 1.0);
if ( SHIBYTE(v8) < 0 )
operator delete(__p[0]);
if ( a3 )
FMODAudioEngine::setMusicTimeMS(a1, a3, 0, a4);
FMODAudioEngine::resumeMusic(a1, a4);
}