//
// MusicBrowser::update from 0x10060eff0 to 0x10060f12a (314 bytes)
//
// 1 xrefs:
// > ??> @ 0x100980680
//
// 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 MusicBrowser::update(MusicBrowser *a1, float a2)
{
FMODAudioEngine *v2; // rax
FMODAudioEngine *v3; // rax
signed int MusicTimeMS; // r15d
FMODAudioEngine *v5; // rax
unsigned int MusicLengthMS; // eax
cocos2d::CCLabelBMFont *m_playLabel; // r14
int v8; // r12d
cocos2d::CCString *v9; // rax
const char *CString; // rax
char v11; // [rsp+0h] [rbp-20h]
v2 = FMODAudioEngine::sharedEngine();
if ( FMODAudioEngine::isMusicPlaying_1(v2, 0) )
{
Slider::enableSlider(a1->m_playSlider);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64, float))a1->m_playLabel->setVisible)(a1->m_playLabel, 1, a2);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_playButton->setVisible)(a1->m_playButton, 1);
v3 = FMODAudioEngine::sharedEngine();
MusicTimeMS = FMODAudioEngine::getMusicTimeMS(v3, 0);
v5 = FMODAudioEngine::sharedEngine();
MusicLengthMS = FMODAudioEngine::getMusicLengthMS(v5, 0);
m_playLabel = a1->m_playLabel;
v8 = MusicLengthMS;
v9 = (cocos2d::CCString *)sub_1007AB580("%i/%is", v11);
CString = cocos2d::CCString::getCString(v9);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_playLabel->setString)(m_playLabel, CString);
if ( !Slider::getLiveDragging(a1->m_playSlider) )
Slider::setValue(a1->m_playSlider, (float)MusicTimeMS / (float)v8);
}
else
{
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD, float))a1->m_playLabel->setVisible)(a1->m_playLabel, 0, a2);
Slider::disableSlider(a1->m_playSlider);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_playButton->setVisible)(a1->m_playButton, 0);
}
}