From b7b848eff5ebd2f1addad46c4fa2f3ee5b242af1 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Sun, 10 Nov 2019 09:37:56 +0900 Subject: [PATCH] Fix audio balance below 50% --- bsnes/emulator/emulator.hpp | 2 +- bsnes/target-bsnes/program/audio.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsnes/emulator/emulator.hpp b/bsnes/emulator/emulator.hpp index b7971618..53017e38 100644 --- a/bsnes/emulator/emulator.hpp +++ b/bsnes/emulator/emulator.hpp @@ -29,7 +29,7 @@ using namespace nall; namespace Emulator { static const string Name = "bsnes"; - static const string Version = "112.9"; + static const string Version = "112.10"; static const string Author = "byuu"; static const string License = "GPLv3"; static const string Website = "https://byuu.org"; diff --git a/bsnes/target-bsnes/program/audio.cpp b/bsnes/target-bsnes/program/audio.cpp index 8950b0e1..eae96915 100644 --- a/bsnes/target-bsnes/program/audio.cpp +++ b/bsnes/target-bsnes/program/audio.cpp @@ -74,6 +74,6 @@ auto Program::updateAudioEffects() -> void { double volume = settings.audio.volume * 0.01; Emulator::audio.setVolume(volume); - double balance = max(-1.0, min(+1.0, (settings.audio.balance - 50) / 50.0)); + double balance = max(-1.0, min(+1.0, ((int)settings.audio.balance - 50) / 50.0)); Emulator::audio.setBalance(balance); }