//
// SongOptionsLayer::onPlayback from 0x97f57c to 0x97f6a4 (296 bytes)
//
// 3 xrefs:
// > ??> @ 0x480e8
// > SongOptionsLayer::init @ 0x981e54
// > ??> @ 0x1541630
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:57:50 +0000
//
__int64 __fastcall SongOptionsLayer::onPlayback(CCTextInputNode **this, cocos2d::CCObject *a2)
{
FMODAudioEngine *v3; // x0
_BOOL8 isMusicPlaying; // x0
char *v5; // x0
double v6; // d0
FMODAudioEngine *v7; // x0
float v8; // s8
FMODAudioEngine *v9; // x22
FMODAudioEngine *v11; // x0
__int64 v12[2]; // [xsp+40h] [xbp+40h] BYREF
char *v13; // [xsp+50h] [xbp+50h]
v3 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(_stack_chk_guard);
isMusicPlaying = FMODAudioEngine::isMusicPlaying(v3, 0);
if ( isMusicPlaying )
{
v11 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine((FMODAudioEngine *)isMusicPlaying);
FMODAudioEngine::stopAllMusic(v11, 1);
}
else
{
CCTextInputNode::getString(*(this + 84), v12);
v5 = (char *)v12 + 1;
if ( (v12[0] & 1) != 0 )
v5 = v13;
v6 = atof(v5);
v7 = (FMODAudioEngine *)LOBYTE(v12[0]);
v8 = v6;
if ( (v12[0] & 1) != 0 )
operator delete(v13);
v9 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v7);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 83) + 16LL))(*(this + 83));
FMODAudioEngine::loadAndPlayMusic(v9, (char *)v12, (unsigned int)(float)(v8 * 1000.0), 0);
if ( (v12[0] & 1) != 0 )
operator delete(v13);
}
SongOptionsLayer::updatePlaybackBtn((SongOptionsLayer *)this);
return _stack_chk_guard;
}