Add spatial sound option to RmlUi, remove ImGui audio menu

This commit is contained in:
Irastris
2026-05-02 16:05:08 -04:00
parent 0e7a7cccb9
commit 97fa09f6ee
3 changed files with 9 additions and 68 deletions
+8
View File
@@ -5,6 +5,7 @@
#include "aurora/gfx.h"
#include "bool_button.hpp"
#include "dusk/audio/DuskAudioSystem.h"
#include "dusk/audio/DuskDsp.hpp"
#include "dusk/config.hpp"
#include "dusk/livesplit.h"
#include "m_Do/m_Do_main.h"
@@ -144,6 +145,7 @@ SettingsWindow::SettingsWindow() {
auto& leftPane = add_child<Pane>(content, Pane::Type::Controlled);
auto& rightPane = add_child<Pane>(content, Pane::Type::Uncontrolled);
// TODO: Individual sliders for Main Music, Sub Music, Sound Effects, and Fanfare.
leftPane.add_section("Volume");
leftPane
.add_child<NumberButton>(NumberButton::Props{
@@ -170,6 +172,12 @@ SettingsWindow::SettingsWindow() {
.helpText = "Enables the reverb effect in game audio.",
.onChange = [](bool value) { audio::SetEnableReverb(value); },
});
config_bool_select(leftPane, rightPane, getSettings().audio.enableHrtf,
{
.key = "Enable Spatial Sound",
.helpText = "Emulate surround sound via HRTF. Recommended only for use with headphones!",
.onChange = [](bool value) { audio::EnableHrtf = value; },
});
leftPane.add_section("Tweaks");
config_bool_select(leftPane, rightPane, getSettings().game.noLowHpSound,