1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Sound refactor and improvements (#12764)

This commit is contained in:
DS 2023-06-16 20:15:21 +02:00 committed by GitHub
parent 8e1af25738
commit edcbfa31c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 2802 additions and 1211 deletions

View file

@ -4816,7 +4816,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
if ((s.ftype == f_TabHeader) &&
(s.fid == event.GUIEvent.Caller->getID())) {
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
s.send = true;
acceptInput();
s.send = false;
@ -4861,7 +4861,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
if (s.ftype == f_Button || s.ftype == f_CheckBox) {
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
s.send = true;
if (s.is_exit) {
@ -4886,7 +4886,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
}
}
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
s.send = true;
acceptInput(quit_mode_no);
@ -4904,7 +4904,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
s.fdefault.clear();
} else if (s.ftype == f_Unknown || s.ftype == f_HyperText) {
if (!s.sound.empty() && m_sound_manager)
m_sound_manager->playSound(SimpleSoundSpec(s.sound, 1.0f));
m_sound_manager->playSound(0, SoundSpec(s.sound, 1.0f));
s.send = true;
acceptInput();
s.send = false;