Skip to content

Commit f8ce208

Browse files
committed
sdl_audio: Drain queue completely when backed up.
1 parent a85ca4a commit f8ce208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/libraries/audio/sdl_audio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class SDLPortBackend : public PortBackend {
7171
// stalling just in case. Otherwise, latency may grow over time unbounded.
7272
if (SDL_GetAudioStreamQueued(stream) >= queue_threshold) {
7373
LOG_WARNING(Lib_AudioOut, "SDL audio queue backed up, draining.");
74-
while (SDL_GetAudioStreamQueued(stream) >= queue_threshold) {
74+
while (SDL_GetAudioStreamQueued(stream)) {
7575
SDL_FlushAudioStream(stream);
7676
std::this_thread::yield();
7777
}

0 commit comments

Comments
 (0)