Port yuzu-emu/yuzu#4164: "hotkeys: Add a "Mute Audio" hotkey" (#5463)

Co-authored-by: Kewlan <colin_rehn@hotmail.com>
This commit is contained in:
Tobias 2022-11-04 20:25:57 +01:00 committed by GitHub
parent 14924e9db3
commit aa84022704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 2 deletions

View file

@ -86,7 +86,7 @@ void DspInterface::OutputCallback(s16* buffer, std::size_t num_frames) {
// Implementation of the hardware volume slider
// A cubic curve is used to approximate a linear change in human-perceived loudness
const float linear_volume = std::clamp(Settings::values.volume, 0.0f, 1.0f);
const float linear_volume = std::clamp(Settings::Volume(), 0.0f, 1.0f);
if (linear_volume != 1.0) {
const float volume_scale_factor = linear_volume * linear_volume * linear_volume;
for (std::size_t i = 0; i < num_frames; i++) {