1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-04 02:16:31 -05:00

Smooth out the DSP callback by adding a 5ms wait time limit

This commit is contained in:
Kelebek1
2023-05-10 17:59:21 +01:00
parent f35c14fb73
commit d75bcdd077
4 changed files with 12 additions and 16 deletions

View File

@@ -271,8 +271,8 @@ u64 SinkStream::GetExpectedPlayedSampleCount() {
void SinkStream::WaitFreeSpace() {
std::unique_lock lk{release_mutex};
release_cv.wait(
lk, [this]() { return queued_buffers < max_queue_size || system.IsShuttingDown(); });
release_cv.wait_for(lk, std::chrono::milliseconds(5),
[this]() { return queued_buffers < max_queue_size; });
}
} // namespace AudioCore::Sink