//
// FMODAudioEngine::updateChannelTweens from 0x6d7344 to 0x6d74b0 (364 bytes)
//
// 2 xrefs:
// > sub_6DC4D0 @ 0x6dc6a0
// > ??> @ 0x102610
//
// This function is hookable on this platform (idp: arm, 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 12:51:31 +0000
//
void __fastcall FMODAudioEngine::updateChannelTweens(FMODAudioEngine *this, float a2)
{
int i; // w23
__int64 TweenContainer; // x21
__int64 **j; // x19
__int64 **v6; // x20
int v7; // w3
float v8; // s1
int v9; // w1
float v10; // s1
int v11; // w2
float v12; // s0
float v13; // s0
__int64 **v14; // x24
__int64 **v15; // x0
for ( i = 0; i != 3; ++i )
{
TweenContainer = FMODAudioEngine::getTweenContainer((__int64)this, i);
v6 = (__int64 **)(TweenContainer + 8);
for ( j = *(__int64 ***)TweenContainer; v6 != j; j = (__int64 **)std::__tree_next *>(j) )
{
while ( 1 )
{
v7 = *((_DWORD *)j + 8);
v8 = *((float *)this + 146) + *((float *)j + 9);
v9 = *((_DWORD *)j + 7);
*((float *)j + 9) = v8;
v10 = v8 / *((float *)j + 10);
if ( v10 < 1.0 )
{
if ( v10 > 0.0 )
{
v11 = v10 == 1.0;
}
else
{
v11 = 0;
v10 = 0.0;
}
}
else
{
v11 = 1;
v10 = 1.0;
}
v12 = *((float *)j + 11);
*((_BYTE *)j + 56) = v11;
v13 = v12 + (float)((float)(*((float *)j + 12) - v12) * v10);
*((float *)j + 13) = v13;
if ( v7 )
{
if ( v7 == 1 )
{
FMODAudioEngine::setChannelPitch(this, v9, i, v13);
v11 = *((unsigned __int8 *)j + 56);
}
}
else
{
FMODAudioEngine::setChannelVolume((__int64)this, v9, i, v13);
v11 = *((unsigned __int8 *)j + 56);
}
if ( !v11 )
break;
v14 = (__int64 **)std::__tree_next *>(j);
if ( j == *(__int64 ***)TweenContainer )
*(_QWORD *)TweenContainer = v14;
--*(_QWORD *)(TweenContainer + 16);
std::__tree_remove *>(*v6, (__int64 *)j);
v15 = j;
j = v14;
operator delete(v15);
if ( v6 == v14 )
goto LABEL_13;
}
}
LABEL_13:
;
}
}