// // FMODAudioEngine::startMusic from 0x5b3e18 to 0x5b41d4 (956 bytes) // // 4 xrefs: // > FMODAudioEngine::triggerQueuedMusic @ 0x5b63bc // > GJBaseGameLayer::processActivatedAudioTriggers @ 0x88d6cc // > SetupSongTriggerPopup::onPlayback @ 0x9a9c38 // > @ 0xb3580 // // 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 FMODAudioEngine::startMusic( FMODAudioEngine *a1, int a2, int a3, int a4, int a5, bool a6, int a7, bool a8, bool a9) { _BOOL4 v14; // w27 int *v15; // x0 FMOD::Channel *v16; // x0 FMOD::Channel *v17; // x20 _BOOL4 v18; // w23 float v19; // s8 int v20; // w22 _BOOL4 v21; // [xsp+88h] [xbp+88h] int v22[4]; // [xsp+8Ch] [xbp+8Ch] BYREF unsigned int v23; // [xsp+9Ch] [xbp+9Ch] BYREF float v24; // [xsp+A0h] [xbp+A0h] BYREF unsigned int v25; // [xsp+A4h] [xbp+A4h] BYREF FMOD::Sound *v26; // [xsp+A8h] [xbp+A8h] BYREF unsigned int v27[2]; // [xsp+B0h] [xbp+B0h] BYREF v21 = a8; v22[0] = a7; v14 = a6; FMODAudioEngine::stopChannelTweens(a1, a7, MusicChannel); v15 = (int *)std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[]( (char **)&a1->m_fmodMusic, v22); v16 = FMODAudioEngine::channelForChannelID(a1, *v15); v17 = v16; if ( v16 ) { if ( a2 <= 0 && a3 <= 0 && a4 <= 0 && a5 <= 0 ) goto LABEL_6; v26 = nullptr; FMOD::Channel::getCurrentSound(v16, &v26); if ( !v26 ) goto LABEL_6; v23 = 0; FMOD::Sound::getLength(v26, &v23, 1u); if ( v14 ) FMOD::Channel::setLoopCount(v17, -1); else FMOD::Channel::setLoopCount(v17, 0); v24 = 1.0; FMOD::ChannelControl::getPitch(v17, &v24); if ( a3 > 0 || a4 > 0 ) { a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v17, nullptr, (unsigned __int64 *)v27); ERRCHECK_fn(); if ( a4 > 0 ) { a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v17, *(unsigned __int64 *)v27, 0.0); ERRCHECK_fn(); a1->m_lastResult = FMOD::ChannelControl::addFadePoint( v17, (unsigned __int64)(float)((float)*(unsigned __int64 *)v27 + (float)((float)a1->m_sampleRate * (float)((float)a4 / 1000.0))), 1.0); ERRCHECK_fn(); } if ( v14 ) goto LABEL_21; v18 = a5 > 0; if ( a3 > 0 ) { v20 = a3 - a2; if ( v20 < 0 ) v20 = 0; if ( v20 ) { v19 = (float)((float)v20 / v24) / 1000.0; a1->m_lastResult = FMOD::ChannelControl::setDelay( v17, 0, (unsigned __int64)(float)((float)*(unsigned __int64 *)v27 + (float)((float)a1->m_sampleRate * v19)), 1); ERRCHECK_fn(); LABEL_18: if ( v18 ) { a1->m_lastResult = FMOD::ChannelControl::addFadePoint( v17, (unsigned __int64)(float)((float)*(unsigned __int64 *)v27 + (float)((float)a1->m_sampleRate * (float)(v19 - (float)((float)a5 / 1000.0)))), 1.0); ERRCHECK_fn(); a1->m_lastResult = FMOD::ChannelControl::addFadePoint( v17, (unsigned __int64)(float)((float)*(unsigned __int64 *)v27 + (float)((float)a1->m_sampleRate * v19)), 0.0); ERRCHECK_fn(); } goto LABEL_6; } LABEL_36: v19 = (float)((float)(int)(v23 - a2) / v24) / 1000.0; goto LABEL_18; } if ( a5 > 0 ) { LABEL_16: if ( a3 ) { v19 = (float)((float)a3 / v24) / 1000.0; goto LABEL_18; } goto LABEL_36; } } else { if ( a5 > 0 ) { a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v17, nullptr, (unsigned __int64 *)v27); v18 = 1; ERRCHECK_fn(); if ( !v14 ) goto LABEL_16; LABEL_21: if ( a3 > 0 || a2 > 0 ) { if ( a3 <= 0 ) { FMOD::Channel::getLoopPoints(v17, &v25, 1u, v27, 1u); a3 = v27[0]; } FMOD::Channel::setLoopPoints(v17, a2, 1u, a3, 1u); } goto LABEL_6; } if ( v14 ) goto LABEL_21; } LABEL_6: if ( !v21 ) FMOD::ChannelControl::setPaused(v17, 0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source