diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 84bb94e52..cc6aa51b2 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -564,19 +564,16 @@ bool Audio::tryCaptureSamples(int16_t* buf, int samples) alcCaptureSamples(Audio::alInDev, buf, samples); - if (inputVolume != 1) + for (size_t i = 0; i < samples * AUDIO_CHANNELS; ++i) { - for (size_t i = 0; i < samples * AUDIO_CHANNELS; ++i) - { - int sample = buf[i] * pow(inputVolume, 2); + int sample = buf[i] * pow(inputVolume, 2); - if (sample < std::numeric_limits::min()) - sample = std::numeric_limits::min(); - else if (sample > std::numeric_limits::max()) - sample = std::numeric_limits::max(); + if (sample < std::numeric_limits::min()) + sample = std::numeric_limits::min(); + else if (sample > std::numeric_limits::max()) + sample = std::numeric_limits::max(); - buf[i] = sample; - } + buf[i] = sample; } return true;