{"type": "func", "start": 5975596, "end": 5975836, "name": "FMODAudioEngine::fadeOutMusic", "pseudocode": "// \n// FMODAudioEngine::fadeOutMusic from 0x5b2e2c to 0x5b2f1c (240 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::showCompleteEffect @ 0x5ca808\n// > GauntletSelectLayer::playUnlockAnimation @ 0x918e24\n// > LevelAreaInnerLayer::onDoor @ 0xa2d994\n// > GJPathPage::playUnlockAnimation @ 0xa6df64\n// > <???> @ 0x351f0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid FMODAudioEngine::fadeOutMusic(FMODAudioEngine *a1, float a2, int a3)\n{\n  FMOD::Channel *ActiveMusicChannel; // x0\n  FMOD::ChannelControl *v6; // x19\n  float Fade; // [xsp+40h] [xbp+40h]\n  unsigned __int64 v8; // [xsp+50h] [xbp+50h] BYREF\n\n  ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);\n  v6 = ActiveMusicChannel;\n  if ( ActiveMusicChannel )\n  {\n    Fade = FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);\n    a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v6, nullptr, &v8);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v6, v8, Fade);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(\n                         v6,\n                         (unsigned __int64)(float)((float)v8 + (float)((float)a1->m_sampleRate * a2)),\n                         0.0);\n    ERRCHECK_fn();\n  }\n}", "assembly": "; \n; FMODAudioEngine::fadeOutMusic from 0x5b2e2c to 0x5b2f1c (240 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::showCompleteEffect @ 0x5ca808\n; > GauntletSelectLayer::playUnlockAnimation @ 0x918e24\n; > LevelAreaInnerLayer::onDoor @ 0xa2d994\n; > GJPathPage::playUnlockAnimation @ 0xa6df64\n; > <???> @ 0x351f0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x5b2e2c\nMOV             X29, SP                                                ; +0x4, 0x5b2e30\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x8, 0x5b2e34\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x5b2e38\nSTR             D8, [SP,#0x60+var_30]                                  ; +0x10, 0x5b2e3c\nFMOV            S8, S0                                                 ; +0x14, 0x5b2e40\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x5b2e44\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x1c, 0x5b2e48\nMOV             X21, X0                                                ; +0x20, 0x5b2e4c\nLDR             X2, [X2]                                               ; +0x24, 0x5b2e50\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x28, 0x5b2e54\nBL              _ZN15FMODAudioEngine21getActiveMusicChannelEi; FMODAudioEngine::getActiveMusicChannel(int) ; +0x2c, 0x5b2e58\nMOV             X19, X0                                                ; +0x30, 0x5b2e5c\nCBZ             X0, loc_5B2EF0                                         ; +0x34, 0x5b2e60\nMOV             X1, X0; FMOD::Channel *                                ; +0x38, 0x5b2e64\nMOV             X0, X21; this                                          ; +0x3c, 0x5b2e68\nADRP            X22, #aUsersRobertLib@PAGE; \"/Users/robert/Library/CloudStorage/Drop\"... ; +0x40, 0x5b2e6c\nBL              _ZN15FMODAudioEngine14stopAndGetFadeEPN4FMOD7ChannelE; FMODAudioEngine::stopAndGetFade(FMOD::Channel *) ; +0x44, 0x5b2e70\nADD             X22, X22, #aUsersRobertLib@PAGEOFF; \"/Users/robert/Library/CloudStorage/Drop\"... ; +0x48, 0x5b2e74\nMOV             X1, #0; unsigned __int64 *                             ; +0x4c, 0x5b2e78\nADD             X2, X29, #0x60+var_10; unsigned __int64 *              ; +0x50, 0x5b2e7c\nMOV             X0, X19; this                                          ; +0x54, 0x5b2e80\nSTR             Q0, [X29,#0x60+var_20]                                 ; +0x58, 0x5b2e84\nBL              ._ZN4FMOD14ChannelControl11getDSPClockEPyS1_; FMOD::ChannelControl::getDSPClock(ulong long *,ulong long *) ; +0x5c, 0x5b2e88\nSTR             W0, [X21,#0x240]                                       ; +0x60, 0x5b2e8c\nMOV             W2, #0xB00                                             ; +0x64, 0x5b2e90\nMOV             X1, X22                                                ; +0x68, 0x5b2e94\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x6c, 0x5b2e98\nLDR             Q0, [X29,#0x60+var_20]; float                          ; +0x70, 0x5b2e9c\nLDR             X1, [X29,#0x60+var_10]; unsigned __int64               ; +0x74, 0x5b2ea0\nMOV             X0, X19; this                                          ; +0x78, 0x5b2ea4\nBL              ._ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x7c, 0x5b2ea8\nSTR             W0, [X21,#0x240]                                       ; +0x80, 0x5b2eac\nMOV             W2, #0xB04                                             ; +0x84, 0x5b2eb0\nMOV             X1, X22                                                ; +0x88, 0x5b2eb4\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x8c, 0x5b2eb8\nLDR             W1, [X21,#0x244]                                       ; +0x90, 0x5b2ebc\nMOV             X0, X19; this                                          ; +0x94, 0x5b2ec0\nFMOV            S0, WZR; float                                         ; +0x98, 0x5b2ec4\nSCVTF           S2, W1                                                 ; +0x9c, 0x5b2ec8\nLDR             X1, [X29,#0x60+var_10]                                 ; +0xa0, 0x5b2ecc\nUCVTF           S1, X1                                                 ; +0xa4, 0x5b2ed0\nFMADD           S1, S2, S8, S1                                         ; +0xa8, 0x5b2ed4\nFCVTZU          X1, S1; unsigned __int64                               ; +0xac, 0x5b2ed8\nBL              ._ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0xb0, 0x5b2edc\nSTR             W0, [X21,#0x240]                                       ; +0xb4, 0x5b2ee0\nMOV             X1, X22                                                ; +0xb8, 0x5b2ee4\nMOV             W2, #0xB06                                             ; +0xbc, 0x5b2ee8\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0xc0, 0x5b2eec\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xc4, 0x5b2ef0\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xc8, 0x5b2ef4\nLDR             X0, [X20]                                              ; +0xcc, 0x5b2ef8\nCMP             X1, X0                                                 ; +0xd0, 0x5b2efc\nB.NE            loc_5B2F18                                             ; +0xd4, 0x5b2f00\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xd8, 0x5b2f04\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xdc, 0x5b2f08\nLDR             D8, [SP,#0x60+var_30]                                  ; +0xe0, 0x5b2f0c\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xe4, 0x5b2f10\nRET                                                                    ; +0xe8, 0x5b2f14\nBL              .__stack_chk_fail                                      ; +0xec, 0x5b2f18", "xrefs": ["PlayLayer::showCompleteEffect @ 0x5ca808", "GauntletSelectLayer::playUnlockAnimation @ 0x918e24", "LevelAreaInnerLayer::onDoor @ 0xa2d994", "GJPathPage::playUnlockAnimation @ 0xa6df64", "<???> @ 0x351f0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}