Audio: Correct protection against time skew.

This commit is contained in:
Unknown W. Brackets committed 2021-10-10 15:05:51 -07:00
1 parent e91b8af27a
commit b1e31d89e1
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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);