diff options
author | bunnei <bunneidev@gmail.com> | 2019-01-27 03:21:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 03:21:04 +0100 |
commit | 6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff (patch) | |
tree | fa8b8426d50594af177ce0c9d955b1415066b966 | |
parent | Merge pull request #1927 from ReinUsesLisp/shader-ir (diff) | |
parent | dsp_interface: fix sound being played while volume is 0 (diff) | |
download | yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.tar yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.tar.gz yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.tar.bz2 yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.tar.lz yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.tar.xz yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.tar.zst yuzu-6957bac03cfc6a0ca4ca81c21dff52f2aa98d8ff.zip |
-rw-r--r-- | src/audio_core/stream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index 874673c4e..4ce2d374e 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp @@ -68,7 +68,7 @@ static void VolumeAdjustSamples(std::vector<s16>& samples) { } // Implementation of a volume slider with a dynamic range of 60 dB - const float volume_scale_factor{std::exp(6.90775f * volume) * 0.001f}; + const float volume_scale_factor = volume == 0 ? 0 : std::exp(6.90775f * volume) * 0.001f; for (auto& sample : samples) { sample = static_cast<s16>(sample * volume_scale_factor); } |