{"type": "func", "start": 3155808, "end": 3156040, "name": "FMODAudioEngine::updateChannelTweens", "pseudocode": "// \n// FMODAudioEngine::updateChannelTweens from 0x302760 to 0x302848 (232 bytes)\n// \n// 1 xrefs:\n// > FMODAudioEngine::update @ 0x30637e\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::updateChannelTweens(FMODAudioEngine *a1, float a2)\n{\n  AudioTargetType i; // r5\n  std::map<std::pair<int, int>,FMODSoundTween> *TweenContainer; // r0\n  int m_left; // r4\n  std::map<std::pair<int, int>,FMODSoundTween> *v6; // r7\n  int v7; // r1\n  int v8; // r3\n  float v9; // s15\n  float v10; // s14\n  float v11; // s15\n  float v12; // s14\n  int v13; // r9\n  void *v14; // r0\n\n  for ( i = SFXChannel; i != (MusicChannel|SFXGroup); ++i )\n  {\n    TweenContainer = FMODAudioEngine::getTweenContainer(a1, i);\n    m_left = (int)TweenContainer->m_header.m_left;\n    v6 = TweenContainer;\n    while ( (std::_rb_tree_base *)m_left != &v6->m_header )\n    {\n      v7 = *(_DWORD *)(m_left + 16);\n      v8 = *(_DWORD *)(m_left + 20);\n      v9 = *(float *)(m_left + 24) + a1->m_audioState.m_interval;\n      v10 = *(float *)(m_left + 28);\n      *(float *)(m_left + 24) = v9;\n      v11 = v9 / v10;\n      if ( v11 >= 1.0 )\n      {\n        v11 = 1.0;\n      }\n      else if ( v11 <= 0.0 )\n      {\n        v11 = 0.0;\n      }\n      v12 = *(float *)(m_left + 32) + (float)((float)(*(float *)(m_left + 36) - *(float *)(m_left + 32)) * v11);\n      *(float *)(m_left + 40) = v12;\n      *(_BYTE *)(m_left + 44) = v11 == 1.0;\n      if ( v8 )\n      {\n        if ( v8 == 1 )\n          FMODAudioEngine::setChannelPitch(a1, v7, i, v12);\n      }\n      else\n      {\n        FMODAudioEngine::setChannelVolume(a1, v7, i, v12);\n      }\n      if ( *(_BYTE *)(m_left + 44) )\n      {\n        v13 = sub_761FA8(m_left);\n        v14 = (void *)sub_7621E4(m_left, &v6->m_header);\n        m_left = v13;\n        operator delete(v14);\n        --v6->m_nodecount;\n      }\n      else\n      {\n        m_left = sub_761FA8(m_left);\n      }\n    }\n  }\n}", "assembly": "; \n; FMODAudioEngine::updateChannelTweens from 0x302760 to 0x302848 (232 bytes)\n; \n; 1 xrefs:\n; > FMODAudioEngine::update @ 0x30637e\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          {R3-R9,LR}                                             ; +0x0, 0x302760\nMOV             R6, R0                                                 ; +0x4, 0x302764\nVPUSH           {D8-D9}                                                ; +0x6, 0x302766\nMOVS            R5, #0                                                 ; +0xa, 0x30276a\nVMOV.F32        S16, #1.0                                              ; +0xc, 0x30276c\nVMOV.F32        S17, S16                                               ; +0x10, 0x302770\nMOV             R0, R6                                                 ; +0x14, 0x302774\nMOV             R1, R5                                                 ; +0x16, 0x302776\nBL              _ZN15FMODAudioEngine17getTweenContainerE15AudioTargetType; FMODAudioEngine::getTweenContainer(AudioTargetType) ; +0x18, 0x302778\nVLDR            S18, =0.0                                              ; +0x1c, 0x30277c\nLDR             R4, [R0,#0xC]                                          ; +0x20, 0x302780\nMOV             R7, R0                                                 ; +0x22, 0x302782\nADD.W           R8, R7, #4                                             ; +0x24, 0x302784\nCMP             R4, R8                                                 ; +0x28, 0x302788\nBEQ             loc_30283A                                             ; +0x2a, 0x30278a\nVLDR            S14, [R6,#0x1B0]                                       ; +0x2c, 0x30278c\nLDR             R1, [R4,#0x10]                                         ; +0x30, 0x302790\nLDR             R3, [R4,#0x14]                                         ; +0x32, 0x302792\nVLDR            S15, [R4,#0x18]                                        ; +0x34, 0x302794\nVADD.F32        S15, S15, S14                                          ; +0x38, 0x302798\nVLDR            S14, [R4,#0x1C]                                        ; +0x3c, 0x30279c\nVSTR            S15, [R4,#0x18]                                        ; +0x40, 0x3027a0\nVDIV.F32        S15, S15, S14                                          ; +0x44, 0x3027a4\nVCMPE.F32       S15, S16                                               ; +0x48, 0x3027a8\nVMRS            APSR_nzcv, FPSCR                                       ; +0x4c, 0x3027ac\nBPL             loc_3027C2                                             ; +0x50, 0x3027b0\nVCMPE.F32       S15, #0.0                                              ; +0x52, 0x3027b2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x56, 0x3027b6\nIT LE                                                                  ; +0x5a, 0x3027ba\nVMOVLE.F32      S15, S18                                               ; +0x5c, 0x3027bc\nB               loc_3027C8                                             ; +0x60, 0x3027c0\nIT PL                                                                  ; +0x62, 0x3027c2\nVMOVPL.F32      S15, #1.0                                              ; +0x64, 0x3027c4\nVLDR            S14, [R4,#0x20]                                        ; +0x68, 0x3027c8\nVLDR            S13, [R4,#0x24]                                        ; +0x6c, 0x3027cc\nVSUB.F32        S13, S13, S14                                          ; +0x70, 0x3027d0\nVMLA.F32        S14, S13, S15                                          ; +0x74, 0x3027d4\nVCMP.F32        S15, S17                                               ; +0x78, 0x3027d8\nVSTR            S14, [R4,#0x28]                                        ; +0x7c, 0x3027dc\nVMRS            APSR_nzcv, FPSCR                                       ; +0x80, 0x3027e0\nITE EQ                                                                 ; +0x84, 0x3027e4\nMOVEQ           R2, #1                                                 ; +0x86, 0x3027e6\nMOVNE           R2, #0                                                 ; +0x88, 0x3027e8\nSTRB.W          R2, [R4,#0x2C]                                         ; +0x8a, 0x3027ea\nCBNZ            R3, loc_3027FE                                         ; +0x8e, 0x3027ee\nMOV             R0, R6                                                 ; +0x90, 0x3027f0\nMOV             R2, R5                                                 ; +0x92, 0x3027f2\nVMOV            R3, S14                                                ; +0x94, 0x3027f4\nBL              _ZN15FMODAudioEngine16setChannelVolumeEi15AudioTargetTypef; FMODAudioEngine::setChannelVolume(int,AudioTargetType,float) ; +0x98, 0x3027f8\nB               loc_30280E                                             ; +0x9c, 0x3027fc\nCMP             R3, #1                                                 ; +0x9e, 0x3027fe\nBNE             loc_30280E                                             ; +0xa0, 0x302800\nMOV             R0, R6                                                 ; +0xa2, 0x302802\nMOV             R2, R5                                                 ; +0xa4, 0x302804\nVMOV            R3, S14                                                ; +0xa6, 0x302806\nBL              _ZN15FMODAudioEngine15setChannelPitchEi15AudioTargetTypef; FMODAudioEngine::setChannelPitch(int,AudioTargetType,float) ; +0xaa, 0x30280a\nLDRB.W          R3, [R4,#0x2C]                                         ; +0xae, 0x30280e\nMOV             R0, R4                                                 ; +0xb2, 0x302812\nCBZ             R3, loc_302832                                         ; +0xb4, 0x302814\nBL              sub_761FA8                                             ; +0xb6, 0x302816\nMOV             R1, R8                                                 ; +0xba, 0x30281a\nMOV             R9, R0                                                 ; +0xbc, 0x30281c\nMOV             R0, R4                                                 ; +0xbe, 0x30281e\nBL              sub_7621E4                                             ; +0xc0, 0x302820\nMOV             R4, R9                                                 ; +0xc4, 0x302824\nBL              _ZdlPv; operator delete(void *)                        ; +0xc6, 0x302826\nLDR             R3, [R7,#0x14]                                         ; +0xca, 0x30282a\nSUBS            R3, #1                                                 ; +0xcc, 0x30282c\nSTR             R3, [R7,#0x14]                                         ; +0xce, 0x30282e\nB               loc_302784                                             ; +0xd0, 0x302830\nBL              sub_761FA8                                             ; +0xd2, 0x302832\nMOV             R4, R0                                                 ; +0xd6, 0x302836\nB               loc_302784                                             ; +0xd8, 0x302838\nADDS            R5, #1                                                 ; +0xda, 0x30283a\nCMP             R5, #3                                                 ; +0xdc, 0x30283c\nBNE             loc_302774                                             ; +0xde, 0x30283e\nVPOP            {D8-D9}                                                ; +0xe0, 0x302840\nPOP.W           {R3-R9,PC}                                             ; +0xe4, 0x302844", "xrefs": ["FMODAudioEngine::update @ 0x30637e"], "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"}