// // FMODAudioEngine::updateChannel from 0x1003e6050 to 0x1003e6335 (741 bytes) // // 10 xrefs: // > GJBaseGameLayer::applySFXEditTrigger @ 0x10015e648 // > GJBaseGameLayer::applySFXEditTrigger @ 0x10015e6bb // > GJBaseGameLayer::processActivatedAudioTriggers @ 0x100160a75 // > GJBaseGameLayer::processActivatedAudioTriggers @ 0x100161682 // > GJBaseGameLayer::processActivatedAudioTriggers @ 0x100161862 // > GJBaseGameLayer::processActivatedAudioTriggers @ 0x10016187e // > GJBaseGameLayer::processSongState @ 0x100162192 // > GJBaseGameLayer::processSongState @ 0x1001621c9 // > GJBaseGameLayer::processSongState @ 0x10016225e // > GJBaseGameLayer::processSongState @ 0x10016228d // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // local variable allocation has failed, the output may be wrong! void __fastcall FMODAudioEngine::updateChannel( FMODAudioEngine *a1, int a2, AudioTargetType a3, AudioModType a4, float a5, float a6) { __int64 v6; // r14 __int64 v8; // rcx __int64 v9; // rax char *v10; // r13 __int64 **v11; // r12 __int64 *v12; // rax __int64 **v13; // r15 __int64 *v14; // rcx __int64 *v15; // rsi __int64 *v16; // rcx __int64 **v17; // rsi bool v18; // zf int v19; // xmm1_4 float *p_m_pitchForMusicChannels; // rdi __int64 *v21; // rax __int64 **v22; // r15 char *v23; // rax __int64 v24; // rcx AudioTargetType v26; // [rsp+14h] [rbp-3Ch] __int64 v27; // [rsp+18h] [rbp-38h] BYREF int v28; // [rsp+20h] [rbp-30h] BYREF v6 = (unsigned int)a4; v28 = a2; v8 = 560; if ( a3 == MusicChannel ) v8 = 608; v9 = 584; if ( a3 != SFXGroup ) v9 = v8; v10 = (char *)a1 + v9; v11 = (__int64 **)((char *)&a1->m_uID + v9); v12 = *v11; if ( *v11 ) { v13 = v11; v14 = *v11; do { if ( *((_DWORD *)v14 + 7) < a2 ) { ++v14; } else if ( *((_DWORD *)v14 + 7) <= a2 ) { if ( *((_DWORD *)v14 + 8) >= (int)v6 ) v13 = (__int64 **)v14; v14 += *((_DWORD *)v14 + 8) < (int)v6; } else { v13 = (__int64 **)v14; } v14 = (__int64 *)*v14; } while ( v14 ); if ( v13 != v11 && *((_DWORD *)v13 + 7) <= a2 && (*((_DWORD *)v13 + 7) < a2 || *((_DWORD *)v13 + 8) <= (int)v6) ) { v15 = v13[1]; if ( v15 ) { do { v16 = v15; v15 = (__int64 *)*v15; } while ( v15 ); } else { v17 = v13; do { v16 = v17[2]; v18 = *v16 == (_QWORD)v17; v17 = (__int64 **)v16; } while ( !v18 ); } v26 = a3; if ( *(__int64 ***)v10 == v13 ) *(_QWORD *)v10 = v16; --*((_QWORD *)v10 + 2); sub_100165F60(v12, (__int64 *)v13); operator delete(v13); a3 = v26; *(_OWORD *)&a5 = LODWORD(a5); } } v19 = 0; if ( a5 <= 0.0 ) { if ( (_DWORD)v6 == 1 ) { FMODAudioEngine::setChannelPitch(a1, a2, a3, a6); } else if ( !(_DWORD)v6 ) { FMODAudioEngine::setChannelVolume(a1, a2, a3, a6); } return; } if ( (_DWORD)v6 == 1 ) { if ( a3 == MusicChannel ) { p_m_pitchForMusicChannels = (float *)&a1->m_audioState.m_pitchForMusicChannels; } else if ( a3 == SFXGroup ) { p_m_pitchForMusicChannels = (float *)&a1->m_audioState.m_pitchForEffectGroups; } else { p_m_pitchForMusicChannels = (float *)&a1->m_audioState.m_pitchForEffectChannels; } goto LABEL_44; } if ( (_DWORD)v6 ) goto LABEL_46; if ( a3 == MusicChannel ) { p_m_pitchForMusicChannels = (float *)&a1->m_audioState.m_volumeForMusicChannels; LABEL_44: v27 = (__int64)&v28; goto LABEL_45; } if ( a3 != SFXGroup ) { p_m_pitchForMusicChannels = (float *)&a1->m_audioState.m_volumeForEffectChannels; goto LABEL_44; } p_m_pitchForMusicChannels = (float *)&a1->m_audioState.m_volumeForEffectGroups; v27 = 0x3FF0000000000000LL; sub_1003EE240(p_m_pitchForMusicChannels, &v28, &v28, &v27); v27 = (__int64)&v28; LABEL_45: v19 = *((_DWORD *)sub_100174230( p_m_pitchForMusicChannels, &v28, *(__m128 *)&a5, (__int64)&unk_10081B0A2, (_DWORD **)&v27) + 5); LABEL_46: v21 = *v11; v22 = v11; LABEL_48: if ( v21 ) { do { v22 = (__int64 **)v21; if ( *((_DWORD *)v21 + 7) > a2 ) { LABEL_47: v21 = (__int64 *)*v21; v11 = v22; goto LABEL_48; } if ( *((_DWORD *)v21 + 7) >= a2 ) { if ( *((_DWORD *)v21 + 8) > (int)v6 ) goto LABEL_47; if ( *((_DWORD *)v21 + 8) >= (int)v6 ) return; } v21 = (__int64 *)v21[1]; } while ( v21 ); v11 = v22 + 1; } v23 = (char *)operator new(0x40u); *(_QWORD *)(v23 + 28) = (v6 << 32) | (unsigned int)a2; *((_DWORD *)v23 + 9) = 0; *((float *)v23 + 10) = a5; *((_DWORD *)v23 + 11) = v19; *((float *)v23 + 12) = a6; *((_DWORD *)v23 + 13) = v19; v23[56] = 0; *(_OWORD *)v23 = 0; *((_QWORD *)v23 + 2) = v22; *v11 = (__int64 *)v23; v24 = **(_QWORD **)v10; if ( v24 ) *(_QWORD *)v10 = v24; sub_100054DD0(*((__int64 **)v10 + 1), (__int64 *)v23); ++*((_QWORD *)v10 + 2); }
GD Web Decomp Icon

GD Web Decomp

Raw Source