From caa58c6907c1bbae78eddcdb618e922c0473ed6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 10 Feb 2021 00:20:13 +0100 Subject: [PATCH] Remove a completely unnecessary check in BackgroundAudio.cpp that caused glitching at 44.1khz. Fixes #14096 --- UI/BackgroundAudio.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/UI/BackgroundAudio.cpp b/UI/BackgroundAudio.cpp index ba03df8ca2..7d6ff7732e 100644 --- a/UI/BackgroundAudio.cpp +++ b/UI/BackgroundAudio.cpp @@ -343,14 +343,12 @@ int BackgroundAudio::Play() { int sz = lastPlaybackTime_ <= 0.0 ? 44100 / 60 : (int)((now - lastPlaybackTime_) * 44100); sz = std::min(BUFSIZE / 2, sz); if (at3Reader_) { - if (sz >= 16) { - if (at3Reader_->Read(buffer, sz)) { - if (fadingOut_) { - for (int i = 0; i < sz*2; i += 2) { - buffer[i] *= volume_; - buffer[i + 1] *= volume_; - volume_ += delta_; - } + if (at3Reader_->Read(buffer, sz)) { + if (fadingOut_) { + for (int i = 0; i < sz*2; i += 2) { + buffer[i] *= volume_; + buffer[i + 1] *= volume_; + volume_ += delta_; } } }