//
// GJBaseGameLayer::applySFXEditTrigger from 0x4780cc to 0x478182 (182 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::activateSongEditTrigger @ 0x484aca
// > GJBaseGameLayer::activateSFXEditTrigger @ 0x484cc8
// > GJBaseGameLayer::activateSFXEditTrigger @ 0x484d08
// > GJBaseGameLayer::activateSFXEditTrigger @ 0x484d2e
//
// 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 GJBaseGameLayer::applySFXEditTrigger(GJBaseGameLayer *a1, int a2, int a3, SFXTriggerGameObject *a4)
{
FMODAudioEngine *v7; // r0
float m_pitch; // s16
FMODAudioEngine *v9; // r0
FMODAudioEngine *v10; // r0
if ( a1->m_practiceMusicSync || !a1->m_isPracticeMode || a1->m_isPlatformer )
{
if ( a4->m_stop || a4->m_stopLoop )
{
v7 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopChannel(v7, a2, a3, a4->m_stopLoop, 0.0);
}
if ( a4->m_changeVolume )
{
m_pitch = a4->m_pitch;
if ( m_pitch <= 0.0 )
{
FMODAudioEngine::sharedEngine();
m_pitch = FMODAudioEngine::pitchForIdx(a4->m_speed);
}
v9 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::updateChannel(v9, a2, (AudioTargetType)a3, Pitch, a4->m_duration, m_pitch);
}
if ( a4->m_changeSpeed )
{
v10 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::updateChannel(v10, a2, (AudioTargetType)a3, Volume, a4->m_duration, a4->m_volume);
}
}
}