//
// SetupSongTriggerPopup::updateSongTimeSlider from 0xaea604 to 0xaea724 (288 bytes)
//
// 2 xrefs:
// > SetupSongTriggerPopup::init @ 0xaeaf34
// > ??> @ 0x7c300
//
// 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 13:01:09 +0000
//
__int64 __fastcall SetupSongTriggerPopup::updateSongTimeSlider(SetupSongTriggerPopup *this)
{
FMODAudioEngine *v2; // x0
MusicDownloadManager *v3; // x22
MusicDownloadManager *v4; // x0
FMODAudioEngine *v5; // x0
unsigned int MusicLengthMS; // w0
float v8; // s8
FMODAudioEngine *v9; // x0
FMODAudioEngine *v10; // x0
FMODAudioEngine *v11[3]; // [xsp+40h] [xbp+40h] BYREF
v2 = (FMODAudioEngine *)*(unsigned int *)(*((_QWORD *)this + 130) + 344LL);
if ( (int)v2 > 0 )
{
v3 = (MusicDownloadManager *)FMODAudioEngine::sharedEngine(v2);
v4 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v3);
MusicDownloadManager::pathForSong((__int64 *)v11, v4, *(_DWORD *)(*((_QWORD *)this + 130) + 344LL));
FMODAudioEngine::loadMusic((__int64)v3, (char *)v11);
if ( ((__int64)v11[0] & 1) != 0 )
{
operator delete(v11[2]);
v10 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v9);
MusicLengthMS = FMODAudioEngine::getMusicLengthMS(v10, 0);
if ( !MusicLengthMS )
return _stack_chk_guard;
}
else
{
v5 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine((FMODAudioEngine *)LOBYTE(v11[0]));
MusicLengthMS = FMODAudioEngine::getMusicLengthMS(v5, 0);
if ( !MusicLengthMS )
return _stack_chk_guard;
}
v8 = (float)MusicLengthMS;
SetupTriggerPopup::setMaxSliderValue(this, (float)MusicLengthMS, 408);
SetupTriggerPopup::setMaxSliderValue(this, v8, 410);
SetupTriggerPopup::updateSlider(this, 408);
SetupTriggerPopup::updateSlider(this, 410);
}
return _stack_chk_guard;
}