mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #10471 from Kelebek1/test2
Wait indefinitely when audio buffer queue is too big
This commit is contained in:
commit
88ccc420b8
@ -273,6 +273,9 @@ void SinkStream::WaitFreeSpace() {
|
|||||||
std::unique_lock lk{release_mutex};
|
std::unique_lock lk{release_mutex};
|
||||||
release_cv.wait_for(lk, std::chrono::milliseconds(5),
|
release_cv.wait_for(lk, std::chrono::milliseconds(5),
|
||||||
[this]() { return queued_buffers < max_queue_size; });
|
[this]() { return queued_buffers < max_queue_size; });
|
||||||
|
if (queued_buffers > max_queue_size + 3) {
|
||||||
|
release_cv.wait(lk, [this]() { return queued_buffers < max_queue_size; });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AudioCore::Sink
|
} // namespace AudioCore::Sink
|
||||||
|
Loading…
Reference in New Issue
Block a user