{"type": "func", "start": 4299059392, "end": 4299059602, "name": "FMODAudioEngine::fadeInMusic", "pseudocode": "// \n// FMODAudioEngine::fadeInMusic from 0x1003e70c0 to 0x1003e7192 (210 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::startMusic @ 0x1000b32d9\n// > GJPathPage::unlockAnimationStep3 @ 0x1003027e1\n// > GauntletSelectLayer::unlockAnimationStep3 @ 0x100573f97\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 __fastcall FMODAudioEngine::fadeInMusic(FMODAudioEngine *a1, float a2, int a3)\n{\n  FMOD::Channel *ActiveMusicChannel; // rax\n  FMOD::ChannelControl *v4; // r14\n  float v5; // xmm0_4\n  unsigned __int64 v6; // [rsp+0h] [rbp-20h] BYREF\n  float v7; // [rsp+Ch] [rbp-14h]\n\n  v7 = a2;\n  ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);\n  if ( ActiveMusicChannel )\n  {\n    v4 = ActiveMusicChannel;\n    FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);\n    a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v4, nullptr, &v6);\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v4, v6, 0.0);\n    if ( (v6 & 0x8000000000000000LL) != 0LL )\n      v5 = (float)(int)((v6 >> 1) | v6 & 1) + (float)(int)((v6 >> 1) | v6 & 1);\n    else\n      v5 = (float)(int)v6;\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(\n                         v4,\n                         (unsigned int)(int)(float)((float)((float)a1->m_sampleRate * v7) + v5),\n                         1.0);\n  }\n}", "assembly": "; \n; FMODAudioEngine::fadeInMusic from 0x1003e70c0 to 0x1003e7192 (210 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::startMusic @ 0x1000b32d9\n; > GJPathPage::unlockAnimationStep3 @ 0x1003027e1\n; > GauntletSelectLayer::unlockAnimationStep3 @ 0x100573f97\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    rbp                                                            ; +0x0, 0x1003e70c0\nmov     rbp, rsp                                                       ; +0x1, 0x1003e70c1\npush    r14                                                            ; +0x4, 0x1003e70c4\npush    rbx                                                            ; +0x6, 0x1003e70c6\nsub     rsp, 10h                                                       ; +0x7, 0x1003e70c7\nmovss   [rbp+var_14], xmm0                                             ; +0xb, 0x1003e70cb\nmov     rbx, rdi                                                       ; +0x10, 0x1003e70d0\ncall    FMODAudioEngine__getActiveMusicChannel                         ; +0x13, 0x1003e70d3\ntest    rax, rax                                                       ; +0x18, 0x1003e70d8\njz      loc_1003E7189                                                  ; +0x1b, 0x1003e70db\nmov     r14, rax                                                       ; +0x21, 0x1003e70e1\nmov     rdi, rbx                                                       ; +0x24, 0x1003e70e4\nmov     rsi, rax                                                       ; +0x27, 0x1003e70e7\ncall    FMODAudioEngine__stopAndGetFade                                ; +0x2a, 0x1003e70ea\nlea     rdx, [rbp+var_20]; unsigned __int64 *                          ; +0x2f, 0x1003e70ef\nmov     rdi, r14; this                                                 ; +0x33, 0x1003e70f3\nxor     esi, esi; unsigned __int64 *                                   ; +0x36, 0x1003e70f6\ncall    __ZN4FMOD14ChannelControl11getDSPClockEPyS1_; FMOD::ChannelControl::getDSPClock(ulong long *,ulong long *) ; +0x38, 0x1003e70f8\nmov     [rbx+210h], eax                                                ; +0x3d, 0x1003e70fd\nmov     rsi, [rbp+var_20]; unsigned __int64                            ; +0x43, 0x1003e7103\nxorps   xmm0, xmm0; float                                              ; +0x47, 0x1003e7107\nmov     rdi, r14; this                                                 ; +0x4a, 0x1003e710a\ncall    __ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x4d, 0x1003e710d\nmov     [rbx+210h], eax                                                ; +0x52, 0x1003e7112\nmov     rax, [rbp+var_20]                                              ; +0x58, 0x1003e7118\ntest    rax, rax                                                       ; +0x5c, 0x1003e711c\njs      short loc_1003E712B                                            ; +0x5f, 0x1003e711f\nxorps   xmm0, xmm0                                                     ; +0x61, 0x1003e7121\ncvtsi2ss xmm0, rax                                                     ; +0x64, 0x1003e7124\njmp     short loc_1003E7143                                            ; +0x69, 0x1003e7129\nmov     rcx, rax                                                       ; +0x6b, 0x1003e712b\nshr     rcx, 1                                                         ; +0x6e, 0x1003e712e\nand     eax, 1                                                         ; +0x71, 0x1003e7131\nor      rax, rcx                                                       ; +0x74, 0x1003e7134\nxorps   xmm0, xmm0                                                     ; +0x77, 0x1003e7137\ncvtsi2ss xmm0, rax                                                     ; +0x7a, 0x1003e713a\naddss   xmm0, xmm0                                                     ; +0x7f, 0x1003e713f\ncvtsi2ss xmm1, dword ptr [rbx+214h]                                    ; +0x83, 0x1003e7143\nmulss   xmm1, [rbp+var_14]                                             ; +0x8b, 0x1003e714b\naddss   xmm1, xmm0                                                     ; +0x90, 0x1003e7150\ncvttss2si rax, xmm1                                                    ; +0x94, 0x1003e7154\nmov     rcx, rax                                                       ; +0x99, 0x1003e7159\nsar     rcx, 3Fh                                                       ; +0x9c, 0x1003e715c\nsubss   xmm1, cs:dword_100815438                                       ; +0xa0, 0x1003e7160\ncvttss2si rsi, xmm1                                                    ; +0xa8, 0x1003e7168\nand     rsi, rcx                                                       ; +0xad, 0x1003e716d\nor      rsi, rax; unsigned __int64                                     ; +0xb0, 0x1003e7170\nmovss   xmm0, cs:alpha; float                                          ; +0xb3, 0x1003e7173\nmov     rdi, r14; this                                                 ; +0xbb, 0x1003e717b\ncall    __ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0xbe, 0x1003e717e\nmov     [rbx+210h], eax                                                ; +0xc3, 0x1003e7183\nadd     rsp, 10h                                                       ; +0xc9, 0x1003e7189\npop     rbx                                                            ; +0xcd, 0x1003e718d\npop     r14                                                            ; +0xce, 0x1003e718e\npop     rbp                                                            ; +0xd0, 0x1003e7190\nretn                                                                   ; +0xd1, 0x1003e7191", "xrefs": ["PlayLayer::startMusic @ 0x1000b32d9", "GJPathPage::unlockAnimationStep3 @ 0x1003027e1", "GauntletSelectLayer::unlockAnimationStep3 @ 0x100573f97"], "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"}