//
// OptionsLayer::sfxSliderChanged from 0x140372a90 to 0x140372b16 (134 bytes)
//
// 3 xrefs:
// > OptionsLayer::customSetup @ 0x140372611
// > PauseLayer::customSetup @ 0x14037d125
// > ??> @ 0x1406d5ad4
//
// 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
//
// Merged with: OptionsLayer::sfxSliderChanged, PauseLayer::sfxSliderChanged
// Hidden C++ exception states: #wind=1
int __fastcall OptionsLayer::sfxSliderChanged(__int64 a1, SliderThumb *a2)
{
float Value; // xmm6_4
__int64 v3; // rax
FMOD::ChannelControl *v4; // rcx
FMODAudioEngine *v6; // [rsp+48h] [rbp+10h]
Value = SliderThumb::getValue(a2);
if ( Value < 0.029999999 )
Value = 0.0;
v3 = qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v6 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v3 = qword_1406C2E88;
}
*(float *)(v3 + 516) = Value;
v4 = *(FMOD::ChannelControl **)(v3 + 584);
if ( v4 )
LODWORD(v3) = FMOD::ChannelControl::setVolume(v4, Value);
return v3;
}