//
// MusicBrowser::update from 0xa5a1f0 to 0xa5a350 (352 bytes)
//
// 2 xrefs:
// > ??> @ 0xb60a0
// > ??> @ 0x11ea7e8
//
// 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 MusicBrowser::update(MusicBrowser *a1, float a2)
{
FMODAudioEngine *v3; // x0
FMODAudioEngine *v4; // x0
unsigned int MusicTimeMS; // w22
FMODAudioEngine *v6; // x0
unsigned int MusicLengthMS; // w0
cocos2d::CCLabelBMFont *m_playLabel; // x20
unsigned int v9; // w21
void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // x23
cocos2d::CCString *v11; // x0
const char *CString; // x0
v3 = FMODAudioEngine::sharedEngine();
if ( FMODAudioEngine::isMusicPlaying(v3, 0) )
{
Slider::enableSlider(a1->m_playSlider);
a1->m_playLabel->setVisible(a1->m_playLabel, 1);
a1->m_playButton->setVisible(a1->m_playButton, 1);
v4 = FMODAudioEngine::sharedEngine();
MusicTimeMS = FMODAudioEngine::getMusicTimeMS(v4, 0);
v6 = FMODAudioEngine::sharedEngine();
MusicLengthMS = FMODAudioEngine::getMusicLengthMS(v6, 0);
m_playLabel = a1->m_playLabel;
v9 = MusicLengthMS;
setString = m_playLabel->setString;
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%is",
(const char *)(MusicTimeMS / 0x3E8uLL),
MusicLengthMS / 0x3E8uLL);
CString = cocos2d::CCString::getCString(v11);
setString(m_playLabel, (const unsigned __int8 *)CString);
if ( !Slider::getLiveDragging(a1->m_playSlider) )
Slider::setValue(a1->m_playSlider, (float)MusicTimeMS / (float)v9);
}
else
{
a1->m_playLabel->setVisible(a1->m_playLabel, 0);
Slider::disableSlider(a1->m_playSlider);
a1->m_playButton->setVisible(a1->m_playButton, 0);
}
}