//
// FMODAudioEngine::setChannelPitch from 0x6d7270 to 0x6d7344 (212 bytes)
//
// 3 xrefs:
// > FMODAudioEngine::updateChannelTweens @ 0x6d74a4
// > FMODAudioEngine::updateChannel @ 0x6d7708
// > ??> @ 0x90808
//
// 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
//
FMOD::ChannelControl *__fastcall FMODAudioEngine::setChannelPitch(FMODAudioEngine *a1, int a2, int a3, float a4)
{
unsigned __int8 v4; // w20
FMOD::ChannelControl *result; // x0
int MusicChannelID; // w0
FMOD::ChannelControl *ChannelGroup; // x0
FMOD::ChannelControl *v10; // x0
int v11; // [xsp+3Ch] [xbp+3Ch] BYREF
v4 = a3;
v11 = a2;
if ( a3 == 1 )
{
*(float *)std::unordered_map::operator[]((unsigned __int64)a1 + 864, &v11) = a4;
ChannelGroup = FMODAudioEngine::getChannelGroup(a1, v11, 0);
FMOD::ChannelControl::setPitch(ChannelGroup, a4);
v10 = FMODAudioEngine::getChannelGroup(a1, v11, v4);
return (FMOD::ChannelControl *)FMOD::ChannelControl::setPitch(v10, a4);
}
if ( a3 != 2 )
{
*(float *)std::unordered_map::operator[]((unsigned __int64)a1 + 744, &v11) = a4;
result = (FMOD::ChannelControl *)FMODAudioEngine::channelForChannelID(a1, v11);
if ( !result )
return result;
return (FMOD::ChannelControl *)FMOD::ChannelControl::setPitch(result, a4);
}
*(float *)std::unordered_map::operator[]((unsigned __int64)a1 + 984, &v11) = a4;
MusicChannelID = FMODAudioEngine::getMusicChannelID(a1, v11);
result = (FMOD::ChannelControl *)FMODAudioEngine::channelForChannelID(a1, MusicChannelID);
if ( result )
return (FMOD::ChannelControl *)FMOD::ChannelControl::setPitch(result, a4);
return result;
}