//
// SongOptionsLayer::onPlayback from 0x1001459b0 to 0x100145a90 (224 bytes)
//
// 1 xrefs:
// > SongOptionsLayer::init @ 0x10014560c
//
// 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 SongOptionsLayer::onPlayback(SongOptionsLayer *a1, cocos2d::CCObject *a2)
{
FMODAudioEngine *v3; // x0
FMODAudioEngine *v4; // x0
double v5; // d8
char *v6; // x20
float v7; // s8
FMODAudioEngine *v8; // x20
void *__p[2]; // [xsp+0h] [xbp-50h] BYREF
char v10; // [xsp+17h] [xbp-39h]
char *v11[2]; // [xsp+18h] [xbp-38h] BYREF
char v12; // [xsp+2Fh] [xbp-21h]
v3 = FMODAudioEngine::sharedEngine();
if ( FMODAudioEngine::isMusicPlaying_1(v3, 0) )
{
v4 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v4, 1);
}
else
{
CCTextInputNode::getString(v11, a1->m_offsetInput);
if ( v12 < 0 )
{
v6 = v11[0];
v5 = atof(v11[0]);
operator delete(v6);
}
else
{
v5 = atof((const char *)v11);
}
v7 = v5;
v8 = FMODAudioEngine::sharedEngine();
((void (__fastcall *)(void **__return_ptr))a1->m_delegate->getSongFileName)(__p);
FMODAudioEngine::loadAndPlayMusic(v8, (__int64)__p, (unsigned int)(float)(v7 * 1000.0), 0);
if ( v10 < 0 )
operator delete(__p[0]);
}
SongOptionsLayer::updatePlaybackBtn(a1);
}