mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-22 13:52:55 +02:00
Fix audio balance below 50%
This commit is contained in:
@@ -29,7 +29,7 @@ using namespace nall;
|
|||||||
|
|
||||||
namespace Emulator {
|
namespace Emulator {
|
||||||
static const string Name = "bsnes";
|
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 Author = "byuu";
|
||||||
static const string License = "GPLv3";
|
static const string License = "GPLv3";
|
||||||
static const string Website = "https://byuu.org";
|
static const string Website = "https://byuu.org";
|
||||||
|
@@ -74,6 +74,6 @@ auto Program::updateAudioEffects() -> void {
|
|||||||
double volume = settings.audio.volume * 0.01;
|
double volume = settings.audio.volume * 0.01;
|
||||||
Emulator::audio.setVolume(volume);
|
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);
|
Emulator::audio.setBalance(balance);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user