//
// OptionsLayer::musicSliderChanged from 0x1404cbb20 to 0x1404cbc23 (259 bytes)
//
// 2 xrefs:
// > OptionsLayer::customSetup @ 0x1404cb605
// > ??> @ 0x140929600
//
// This function is hookable on this platform (idp: pc, 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 11:32:58 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall OptionsLayer::musicSliderChanged(__int64 a1, float *a2)
{
float Value; // xmm6_4
__int64 v3; // rax
float v4; // xmm8_4
__int64 v5; // rcx
__int64 v6; // rcx
void *v7; // [rsp+68h] [rbp+10h]
void *v8; // [rsp+68h] [rbp+10h]
Value = SliderThumb::getValue(a2);
if ( Value < 0.029999999 )
Value = 0.0;
v3 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v7 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v3 = qword_14090BF60;
}
v4 = *(float *)(v3 + 512);
*(_DWORD *)(v3 + 524) = 0;
*(float *)(v3 + 512) = Value;
v5 = *(_QWORD *)(v3 + 552);
if ( v5 )
FMOD::ChannelControl::setVolume(v5);
if ( v4 <= 0.0 && Value > 0.0 )
{
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v8 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
GameManager::playMenuMusic(v6);
}
}