{"type": "func", "start": 3156184, "end": 3156366, "name": "FMODAudioEngine::fadeInMusic", "pseudocode": "// \n// FMODAudioEngine::fadeInMusic from 0x3028d8 to 0x30298e (182 bytes)\n// \n// 4 xrefs:\n// > FMODAudioEngine::playMusic @ 0x3037e4\n// > PlayLayer::startMusic @ 0x31f38c\n// > GauntletSelectLayer::unlockAnimationStep3 @ 0x4d7454\n// > GJPathPage::unlockAnimationStep3 @ 0x58cc82\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::fadeInMusic(FMODAudioEngine *a1, float a2, int a3)\n{\n  FMOD::Channel *ActiveMusicChannel; // r0\n  FMOD::ChannelControl *v6; // r6\n  unsigned __int64 v7; // [sp+8h] [bp-14h] BYREF\n\n  ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);\n  v6 = ActiveMusicChannel;\n  if ( ActiveMusicChannel )\n  {\n    FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);\n    a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v6, nullptr, &v7);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v6, v7, 0.0);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(\n                         v6,\n                         (unsigned __int64)(float)((float)v7 + (float)((float)a1->m_sampleRate * a2)),\n                         1.0);\n    ERRCHECK_fn();\n  }\n}", "assembly": "; \n; FMODAudioEngine::fadeInMusic from 0x3028d8 to 0x30298e (182 bytes)\n; \n; 4 xrefs:\n; > FMODAudioEngine::playMusic @ 0x3037e4\n; > PlayLayer::startMusic @ 0x31f38c\n; > GauntletSelectLayer::unlockAnimationStep3 @ 0x4d7454\n; > GJPathPage::unlockAnimationStep3 @ 0x58cc82\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            {R4-R7,LR}                                             ; +0x0, 0x3028d8\nMOV             R5, R0                                                 ; +0x2, 0x3028da\nLDR             R4, =(__stack_chk_guard_ptr - 0x3028E6)                ; +0x4, 0x3028dc\nVPUSH           {D8}                                                   ; +0x6, 0x3028de\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xa, 0x3028e2\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xc, 0x3028e4\nLDR             R3, [R4]                                               ; +0xe, 0x3028e6\nVMOV            S16, R1                                                ; +0x10, 0x3028e8\nSUB             SP, SP, #0x1C                                          ; +0x14, 0x3028ec\nMOV             R1, R2; int                                            ; +0x16, 0x3028ee\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x18, 0x3028f0\nBL              _ZN15FMODAudioEngine21getActiveMusicChannelEi; FMODAudioEngine::getActiveMusicChannel(int) ; +0x1a, 0x3028f2\nMOV             R6, R0                                                 ; +0x1e, 0x3028f6\nCMP             R0, #0                                                 ; +0x20, 0x3028f8\nBEQ             loc_30297A                                             ; +0x22, 0x3028fa\nMOV             R1, R6; FMOD::Channel *                                ; +0x24, 0x3028fc\nMOV             R0, R5; this                                           ; +0x26, 0x3028fe\nBL              _ZN15FMODAudioEngine14stopAndGetFadeEPN4FMOD7ChannelE; FMODAudioEngine::stopAndGetFade(FMOD::Channel *) ; +0x28, 0x302900\nMOVS            R1, #0; unsigned __int64 *                             ; +0x2c, 0x302904\nADD             R2, SP, #0x1C+var_14; unsigned __int64 *               ; +0x2e, 0x302906\nMOV             R0, R6; this                                           ; +0x30, 0x302908\nBLX             _ZN4FMOD14ChannelControl11getDSPClockEPyS1_; FMOD::ChannelControl::getDSPClock(ulong long *,ulong long *) ; +0x32, 0x30290a\nLDR             R7, =(aUsersRobertLib - 0x302918); \"/Users/robert/Library/CloudStorage/Drop\"... ; +0x36, 0x30290e\nMOVW            R2, #0xAED                                             ; +0x38, 0x302910\nADD             R7, PC; \"/Users/robert/Library/CloudStorage/Drop\"...   ; +0x3c, 0x302914\nMOV             R1, R7                                                 ; +0x3e, 0x302916\nSTR.W           R0, [R5,#0x198]                                        ; +0x40, 0x302918\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x44, 0x30291c\nMOVS            R3, #0                                                 ; +0x48, 0x302920\nMOV             R0, R6; this                                           ; +0x4a, 0x302922\nSTR             R3, [SP,#0x1C+var_1C]; float                           ; +0x4c, 0x302924\nLDRD.W          R2, R3, [SP,#0x1C+var_14]; unsigned __int64            ; +0x4e, 0x302926\nBLX             _ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x52, 0x30292a\nMOVW            R2, #0xAF1                                             ; +0x56, 0x30292e\nMOV             R1, R7                                                 ; +0x5a, 0x302932\nSTR.W           R0, [R5,#0x198]                                        ; +0x5c, 0x302934\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x60, 0x302938\nLDRD.W          R0, R1, [SP,#0x1C+var_14]                              ; +0x64, 0x30293c\nBLX             __aeabi_ul2f                                           ; +0x68, 0x302940\nVLDR            S15, [R5,#0x19C]                                       ; +0x6c, 0x302944\nVCVT.F32.S32    S15, S15                                               ; +0x70, 0x302948\nVMOV            S14, R0                                                ; +0x74, 0x30294c\nVMLA.F32        S14, S15, S16                                          ; +0x78, 0x302950\nVMOV            R0, S14                                                ; +0x7c, 0x302954\nBLX             __aeabi_f2ulz                                          ; +0x80, 0x302958\nMOV             R2, R0; unsigned __int64                               ; +0x84, 0x30295c\nMOV             R3, R1                                                 ; +0x86, 0x30295e\nMOV             R0, R6; this                                           ; +0x88, 0x302960\nMOV.W           R1, #0x3F800000                                        ; +0x8a, 0x302962\nSTR             R1, [SP,#0x1C+var_1C]; float                           ; +0x8e, 0x302966\nBLX             _ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x90, 0x302968\nMOV             R1, R7                                                 ; +0x94, 0x30296c\nMOVW            R2, #0xAF3                                             ; +0x96, 0x30296e\nSTR.W           R0, [R5,#0x198]                                        ; +0x9a, 0x302972\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x9e, 0x302976\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xa2, 0x30297a\nLDR             R3, [R4]                                               ; +0xa4, 0x30297c\nCMP             R2, R3                                                 ; +0xa6, 0x30297e\nBEQ             loc_302986                                             ; +0xa8, 0x302980\nBLX             __stack_chk_fail                                       ; +0xaa, 0x302982\nADD             SP, SP, #0x1C                                          ; +0xae, 0x302986\nVPOP            {D8}                                                   ; +0xb0, 0x302988\nPOP             {R4-R7,PC}                                             ; +0xb4, 0x30298c", "xrefs": ["FMODAudioEngine::playMusic @ 0x3037e4", "PlayLayer::startMusic @ 0x31f38c", "GauntletSelectLayer::unlockAnimationStep3 @ 0x4d7454", "GJPathPage::unlockAnimationStep3 @ 0x58cc82"], "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"}