{"type": "func", "start": 3159936, "end": 3160106, "name": "FMODAudioEngine::playMusic", "pseudocode": "// \n// FMODAudioEngine::playMusic from 0x303780 to 0x30382a (170 bytes)\n// \n// 6 xrefs:\n// > PlayLayer::togglePracticeMode @ 0x314370\n// > GameManager::fadeInMusic @ 0x320c68\n// > GameManager::playMenuMusic @ 0x323f68\n// > CustomSongWidget::onPlayback @ 0x3dd6de\n// > GJShopLayer::showReactMessage @ 0x4e268c\n// > GJShopLayer::init @ 0x4e36dc\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\nFMOD::Channel *__fastcall FMODAudioEngine::playMusic(FMOD::Channel *result, int a2, char a3, float a4, int a5)\n{\n  FMODAudioEngine *v6; // r6\n  FMOD::ChannelControl *m_backgroundMusicChannel; // r0\n  int v9; // [sp+18h] [bp-8h] BYREF\n\n  v6 = (FMODAudioEngine *)result;\n  if ( *(_DWORD *)&result[384].FMOD::ChannelControl )\n  {\n    sub_775C20(&v9, a2);\n    FMODAudioEngine::loadMusic((int)v6, &v9, 1.0, 0.0, 1.0, a3, a5, 0, 0);\n    sub_774008(&v9);\n    if ( a4 > 0.0 )\n      FMODAudioEngine::fadeInMusic(v6, a4, a5);\n    FMODAudioEngine::resumeMusic(v6, a5);\n    m_backgroundMusicChannel = v6->m_backgroundMusicChannel;\n    LOBYTE(v9) = 0;\n    FMOD::ChannelControl::getPaused(m_backgroundMusicChannel, (bool *)&v9);\n    return FMODAudioEngine::getActiveMusicChannel(v6, a5);\n  }\n  return result;\n}", "assembly": "; \n; FMODAudioEngine::playMusic from 0x303780 to 0x30382a (170 bytes)\n; \n; 6 xrefs:\n; > PlayLayer::togglePracticeMode @ 0x314370\n; > GameManager::fadeInMusic @ 0x320c68\n; > GameManager::playMenuMusic @ 0x323f68\n; > CustomSongWidget::onPlayback @ 0x3dd6de\n; > GJShopLayer::showReactMessage @ 0x4e268c\n; > GJShopLayer::init @ 0x4e36dc\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, 0x303780\nMOV             R8, R2                                                 ; +0x4, 0x303784\nVPUSH           {D8}                                                   ; +0x6, 0x303786\nMOV             R6, R0                                                 ; +0xa, 0x30378a\nVMOV            S16, R3                                                ; +0xc, 0x30378c\nLDR             R3, =(__stack_chk_guard_ptr - 0x303798)                ; +0x10, 0x303790\nSUB             SP, SP, #0x20                                          ; +0x12, 0x303792\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x14, 0x303794\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x16, 0x303796\nLDR             R7, [SP,#0x20+arg_0]                                   ; +0x18, 0x303798\nLDR             R2, [R3]                                               ; +0x1a, 0x30379a\nMOV             R5, R3                                                 ; +0x1c, 0x30379c\nSTR             R2, [SP,#0x20+var_4]                                   ; +0x1e, 0x30379e\nLDR.W           R2, [R0,#0x180]                                        ; +0x20, 0x3037a0\nCBZ             R2, loc_303814                                         ; +0x24, 0x3037a4\nADD             R4, SP, #0x20+var_8                                    ; +0x26, 0x3037a6\nMOV             R0, R4                                                 ; +0x28, 0x3037a8\nBL              sub_775C20                                             ; +0x2a, 0x3037aa\nMOV.W           R3, #0x3F800000                                        ; +0x2e, 0x3037ae\nMOVS            R2, #0                                                 ; +0x32, 0x3037b2\nSTR             R3, [SP,#0x20+var_20]; float                           ; +0x34, 0x3037b4\nSTR             R2, [SP,#0x20+var_14]; int                             ; +0x36, 0x3037b6\nMOV             R0, R6; int                                            ; +0x38, 0x3037b8\nSTR             R2, [SP,#0x20+var_10]; char                            ; +0x3a, 0x3037ba\nMOV             R1, R4; int                                            ; +0x3c, 0x3037bc\nMOV             R2, R3; int                                            ; +0x3e, 0x3037be\nSTR.W           R8, [SP,#0x20+var_1C]; char                            ; +0x40, 0x3037c0\nSTR             R7, [SP,#0x20+var_18]; int                             ; +0x44, 0x3037c4\nMOVS            R3, #0; int                                            ; +0x46, 0x3037c6\nBL              _ZN15FMODAudioEngine9loadMusicESsfffbiib; FMODAudioEngine::loadMusic(std::string,float,float,float,bool,int,int,bool) ; +0x48, 0x3037c8\nMOV             R0, R4                                                 ; +0x4c, 0x3037cc\nBL              sub_774008                                             ; +0x4e, 0x3037ce\nVCMPE.F32       S16, #0.0                                              ; +0x52, 0x3037d2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x56, 0x3037d6\nBLE             loc_3037E8                                             ; +0x5a, 0x3037da\nMOV             R0, R6; this                                           ; +0x5c, 0x3037dc\nVMOV            R1, S16; float                                         ; +0x5e, 0x3037de\nMOV             R2, R7; int                                            ; +0x62, 0x3037e2\nBL              _ZN15FMODAudioEngine11fadeInMusicEfi; FMODAudioEngine::fadeInMusic(float,int) ; +0x64, 0x3037e4\nMOV             R0, R6; this                                           ; +0x68, 0x3037e8\nMOV             R1, R7; int                                            ; +0x6a, 0x3037ea\nBL              _ZN15FMODAudioEngine11resumeMusicEi; FMODAudioEngine::resumeMusic(int) ; +0x6c, 0x3037ec\nMOV             R1, R4; bool *                                         ; +0x70, 0x3037f0\nLDR.W           R0, [R6,#0x180]; this                                  ; +0x72, 0x3037f2\nMOVS            R3, #0                                                 ; +0x76, 0x3037f6\nSTRB.W          R3, [SP,#0x20+var_8]                                   ; +0x78, 0x3037f8\nBLX             _ZN4FMOD14ChannelControl9getPausedEPb; FMOD::ChannelControl::getPaused(bool *) ; +0x7c, 0x3037fc\nMOV             R0, R6; this                                           ; +0x80, 0x303800\nMOV             R1, R7; int                                            ; +0x82, 0x303802\nBL              _ZN15FMODAudioEngine21getActiveMusicChannelEi; FMODAudioEngine::getActiveMusicChannel(int) ; +0x84, 0x303804\nB               loc_303814                                             ; +0x88, 0x303808\nMOV             R0, R4                                                 ; +0x8a, 0x30380a\nBL              sub_774008                                             ; +0x8c, 0x30380c\nBL              __cxa_end_cleanup                                      ; +0x90, 0x303810\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x94, 0x303814\nLDR             R3, [R5]                                               ; +0x96, 0x303816\nCMP             R2, R3                                                 ; +0x98, 0x303818\nBEQ             loc_303820                                             ; +0x9a, 0x30381a\nBLX             __stack_chk_fail                                       ; +0x9c, 0x30381c\nADD             SP, SP, #0x20 ; ' '                                    ; +0xa0, 0x303820\nVPOP            {D8}                                                   ; +0xa2, 0x303822\nPOP.W           {R4-R8,PC}                                             ; +0xa6, 0x303826", "xrefs": ["PlayLayer::togglePracticeMode @ 0x314370", "GameManager::fadeInMusic @ 0x320c68", "GameManager::playMenuMusic @ 0x323f68", "CustomSongWidget::onPlayback @ 0x3dd6de", "GJShopLayer::showReactMessage @ 0x4e268c", "GJShopLayer::init @ 0x4e36dc"], "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"}