diff --git a/Core/HW/StereoResampler.cpp b/Core/HW/StereoResampler.cpp index 3f0f973a0b92..1a8a033821a9 100644 --- a/Core/HW/StereoResampler.cpp +++ b/Core/HW/StereoResampler.cpp @@ -283,7 +283,7 @@ void StereoResampler::PushSamples(const s32 *samples, unsigned int numSamples) { } // Check if we need to roll over to the start of the buffer during the copy. - int indexW_left_samples = m_maxBufsize * 2 - (indexW & INDEX_MASK); + unsigned int indexW_left_samples = m_maxBufsize * 2 - (indexW & INDEX_MASK); if (numSamples * 2 > indexW_left_samples) { ClampBufferToS16WithVolume(&m_buffer[indexW & INDEX_MASK], samples, indexW_left_samples); ClampBufferToS16WithVolume(&m_buffer[0], samples + indexW_left_samples, numSamples * 2 - indexW_left_samples); diff --git a/UI/BackgroundAudio.cpp b/UI/BackgroundAudio.cpp index 5db580ffcdd9..ff83abcfc519 100644 --- a/UI/BackgroundAudio.cpp +++ b/UI/BackgroundAudio.cpp @@ -345,7 +345,7 @@ int BackgroundAudio::Play() { double now = time_now_d(); int sz = 44100 / 60; - if (lastPlaybackTime_ > 0.0 && lastPlaybackTime_ >= now) { + if (lastPlaybackTime_ > 0.0 && lastPlaybackTime_ <= now) { sz = (int)((now - lastPlaybackTime_) * 44100); } sz = std::min(BUFSIZE / 2, sz);