//
// FMOD::DSPConnection::setMixMatrix from 0x180057630 to 0x180057809 (473 bytes)
//
// 5 xrefs:
// > FMOD_DSPConnection_SetMixMatrix @ 0x1800c5adb
// > ??> @ 0x180182354
// > ??> @ 0x180182388
// > ??> @ 0x180194348
// > ??> @ 0x1801f8e74
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:53:19 +0000
//
__int64 __fastcall FMOD::DSPConnection::setMixMatrix(
__int64 a1,
__int64 a2,
unsigned int a3,
unsigned int a4,
unsigned int a5)
{
int v8; // r12d
unsigned int v9; // esi
int v10; // ebx
int v11; // ebx
int v12; // ebx
int v13; // ebx
int v14; // ebx
int v15; // eax
__int64 v17; // [rsp+40h] [rbp-158h] BYREF
__int64 v18; // [rsp+48h] [rbp-150h] BYREF
_BYTE v19[256]; // [rsp+50h] [rbp-148h] BYREF
v8 = a1;
v17 = 0;
v9 = sub_18005AF70(a1, &v18, &v17);
if ( (v9 || (v9 = sub_18005A650(v18, a2, a3, a4, a5, 64, 1)) != 0) && *((char *)off_1801AED20 + 16) < 0 )
{
v10 = sub_1800F30A0(v19, 256, a2);
v11 = sub_1800F2F70(&v19[v10]) + v10;
v12 = sub_1800F2EC0(&v19[v11], (unsigned int)(256 - v11), a3) + v11;
v13 = sub_1800F2F70(&v19[v12]) + v12;
v14 = sub_1800F2EC0(&v19[v13], (unsigned int)(256 - v13), a4) + v13;
v15 = sub_1800F2F70(&v19[v14]);
sub_1800F2EC0(&v19[v15 + v14], (unsigned int)(256 - (v15 + v14)), a5);
sub_1800B20E0(v9, 8, v8, (unsigned int)"DSPConnection::setMixMatrix", (__int64)v19);
}
if ( v17 )
sub_180102320();
return v9;
}