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:
parent
14924e9db3
commit
aa84022704
5 changed files with 16 additions and 2 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue