{"type": "func", "start": 3156572, "end": 3156758, "name": "FMODAudioEngine::fadeMusic", "pseudocode": "// \n// FMODAudioEngine::fadeMusic from 0x302a5c to 0x302b16 (186 bytes)\n// \n// 2 xrefs:\n// > SecretRewardsLayer::fadeInMusic @ 0x585108\n// > SecretRewardsLayer::fadeInOutMusic @ 0x585d8a\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::fadeMusic(FMODAudioEngine *a1, float a2, int a3, float a4, float a5)\n{\n  FMOD::Channel *ActiveMusicChannel; // r0\n  FMOD::ChannelControl *v9; // r6\n  unsigned __int64 v10; // [sp+8h] [bp-10h] BYREF\n\n  ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);\n  v9 = ActiveMusicChannel;\n  if ( ActiveMusicChannel )\n  {\n    FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);\n    a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v9, nullptr, &v10);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v9, v10, a4);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(\n                         v9,\n                         (unsigned __int64)(float)((float)v10 + (float)((float)a1->m_sampleRate * a2)),\n                         a5);\n    ERRCHECK_fn();\n  }\n}", "assembly": "; \n; FMODAudioEngine::fadeMusic from 0x302a5c to 0x302b16 (186 bytes)\n; \n; 2 xrefs:\n; > SecretRewardsLayer::fadeInMusic @ 0x585108\n; > SecretRewardsLayer::fadeInOutMusic @ 0x585d8a\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\nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x302a5c\nMOV             R8, R3                                                 ; +0x4, 0x302a60\nLDR             R4, =(__stack_chk_guard_ptr - 0x302A6E)                ; +0x6, 0x302a62\nMOV             R5, R0                                                 ; +0x8, 0x302a64\nVPUSH           {D8}                                                   ; +0xa, 0x302a66\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xe, 0x302a6a\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x10, 0x302a6c\nLDR             R3, [R4]                                               ; +0x12, 0x302a6e\nVMOV            S16, R1                                                ; +0x14, 0x302a70\nSUB             SP, SP, #0x18                                          ; +0x18, 0x302a74\nMOV             R1, R2; int                                            ; +0x1a, 0x302a76\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x1c, 0x302a78\nBL              _ZN15FMODAudioEngine21getActiveMusicChannelEi; FMODAudioEngine::getActiveMusicChannel(int) ; +0x1e, 0x302a7a\nMOV             R6, R0                                                 ; +0x22, 0x302a7e\nCMP             R0, #0                                                 ; +0x24, 0x302a80\nBEQ             loc_302B00                                             ; +0x26, 0x302a82\nMOV             R1, R6; FMOD::Channel *                                ; +0x28, 0x302a84\nMOV             R0, R5; this                                           ; +0x2a, 0x302a86\nBL              _ZN15FMODAudioEngine14stopAndGetFadeEPN4FMOD7ChannelE; FMODAudioEngine::stopAndGetFade(FMOD::Channel *) ; +0x2c, 0x302a88\nMOVS            R1, #0; unsigned __int64 *                             ; +0x30, 0x302a8c\nADD             R2, SP, #0x18+var_10; unsigned __int64 *               ; +0x32, 0x302a8e\nMOV             R0, R6; this                                           ; +0x34, 0x302a90\nBLX             _ZN4FMOD14ChannelControl11getDSPClockEPyS1_; FMOD::ChannelControl::getDSPClock(ulong long *,ulong long *) ; +0x36, 0x302a92\nLDR             R7, =(aUsersRobertLib - 0x302AA0); \"/Users/robert/Library/CloudStorage/Drop\"... ; +0x3a, 0x302a96\nMOVW            R2, #0xB14                                             ; +0x3c, 0x302a98\nADD             R7, PC; \"/Users/robert/Library/CloudStorage/Drop\"...   ; +0x40, 0x302a9c\nMOV             R1, R7                                                 ; +0x42, 0x302a9e\nSTR.W           R0, [R5,#0x198]                                        ; +0x44, 0x302aa0\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x48, 0x302aa4\nLDRD.W          R2, R3, [SP,#0x18+var_10]; unsigned __int64            ; +0x4c, 0x302aa8\nSTR.W           R8, [SP,#0x18+var_18]; float                           ; +0x50, 0x302aac\nMOV             R0, R6; this                                           ; +0x54, 0x302ab0\nBLX             _ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x56, 0x302ab2\nMOVW            R2, #0xB18                                             ; +0x5a, 0x302ab6\nMOV             R1, R7                                                 ; +0x5e, 0x302aba\nSTR.W           R0, [R5,#0x198]                                        ; +0x60, 0x302abc\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x64, 0x302ac0\nLDRD.W          R0, R1, [SP,#0x18+var_10]                              ; +0x68, 0x302ac4\nBLX             __aeabi_ul2f                                           ; +0x6c, 0x302ac8\nVLDR            S15, [R5,#0x19C]                                       ; +0x70, 0x302acc\nVCVT.F32.S32    S15, S15                                               ; +0x74, 0x302ad0\nVMOV            S14, R0                                                ; +0x78, 0x302ad4\nVMLA.F32        S14, S15, S16                                          ; +0x7c, 0x302ad8\nVMOV            R0, S14                                                ; +0x80, 0x302adc\nBLX             __aeabi_f2ulz                                          ; +0x84, 0x302ae0\nMOV             R3, R1                                                 ; +0x88, 0x302ae4\nLDR             R1, [SP,#0x18+arg_0]                                   ; +0x8a, 0x302ae6\nMOV             R2, R0; unsigned __int64                               ; +0x8c, 0x302ae8\nMOV             R0, R6; this                                           ; +0x8e, 0x302aea\nSTR             R1, [SP,#0x18+var_18]; float                           ; +0x90, 0x302aec\nBLX             _ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x92, 0x302aee\nMOV             R1, R7                                                 ; +0x96, 0x302af2\nMOVW            R2, #0xB1A                                             ; +0x98, 0x302af4\nSTR.W           R0, [R5,#0x198]                                        ; +0x9c, 0x302af8\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0xa0, 0x302afc\nLDR             R2, [SP,#0x18+var_4]                                   ; +0xa4, 0x302b00\nLDR             R3, [R4]                                               ; +0xa6, 0x302b02\nCMP             R2, R3                                                 ; +0xa8, 0x302b04\nBEQ             loc_302B0C                                             ; +0xaa, 0x302b06\nBLX             __stack_chk_fail                                       ; +0xac, 0x302b08\nADD             SP, SP, #0x18                                          ; +0xb0, 0x302b0c\nVPOP            {D8}                                                   ; +0xb2, 0x302b0e\nPOP.W           {R4-R8,PC}                                             ; +0xb6, 0x302b12", "xrefs": ["SecretRewardsLayer::fadeInMusic @ 0x585108", "SecretRewardsLayer::fadeInOutMusic @ 0x585d8a"], "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"}