//
// FMODAudioEngine::updateChannelTweens from 0x302760 to 0x302848 (232 bytes)
//
// 1 xrefs:
// > FMODAudioEngine::update @ 0x30637e
//
// 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
//
void FMODAudioEngine::updateChannelTweens(FMODAudioEngine *a1, float a2)
{
AudioTargetType i; // r5
std::map,FMODSoundTween> *TweenContainer; // r0
int m_left; // r4
std::map,FMODSoundTween> *v6; // r7
int v7; // r1
int v8; // r3
float v9; // s15
float v10; // s14
float v11; // s15
float v12; // s14
int v13; // r9
void *v14; // r0
for ( i = SFXChannel; i != (MusicChannel|SFXGroup); ++i )
{
TweenContainer = FMODAudioEngine::getTweenContainer(a1, i);
m_left = (int)TweenContainer->m_header.m_left;
v6 = TweenContainer;
while ( (std::_rb_tree_base *)m_left != &v6->m_header )
{
v7 = *(_DWORD *)(m_left + 16);
v8 = *(_DWORD *)(m_left + 20);
v9 = *(float *)(m_left + 24) + a1->m_audioState.m_interval;
v10 = *(float *)(m_left + 28);
*(float *)(m_left + 24) = v9;
v11 = v9 / v10;
if ( v11 >= 1.0 )
{
v11 = 1.0;
}
else if ( v11 <= 0.0 )
{
v11 = 0.0;
}
v12 = *(float *)(m_left + 32) + (float)((float)(*(float *)(m_left + 36) - *(float *)(m_left + 32)) * v11);
*(float *)(m_left + 40) = v12;
*(_BYTE *)(m_left + 44) = v11 == 1.0;
if ( v8 )
{
if ( v8 == 1 )
FMODAudioEngine::setChannelPitch(a1, v7, i, v12);
}
else
{
FMODAudioEngine::setChannelVolume(a1, v7, i, v12);
}
if ( *(_BYTE *)(m_left + 44) )
{
v13 = sub_761FA8(m_left);
v14 = (void *)sub_7621E4(m_left, &v6->m_header);
m_left = v13;
operator delete(v14);
--v6->m_nodecount;
}
else
{
m_left = sub_761FA8(m_left);
}
}
}
}