//
// CustomSongLayer::onClose from 0x1002158b0 to 0x100215916 (102 bytes)
//
// 1 xrefs:
// > CustomSongLayer::init @ 0x100214e5a
//
// 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 CustomSongLayer::onClose(CustomSongLayer *a1, cocos2d::CCObject *a2)
{
CustomSongLayerDelegate *m_delegate; // rdi
FMODAudioEngine *v4; // rax
m_delegate = a1->m_delegate;
if ( m_delegate )
((void (__fastcall *)(CustomSongLayerDelegate *, cocos2d::CCObject *))m_delegate->customSongLayerClosed)(
m_delegate,
a2);
((void (__fastcall *)(CCTextInputNode *, _QWORD))a1->m_songIDInput->onClickTrackNode)(a1->m_songIDInput, 0);
v4 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v4, 1);
((void (__fastcall *)(CustomSongLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(CustomSongLayer *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}