Smooth out the DSP callback by adding a 5ms wait time limit
This commit is contained in:
parent
f35c14fb73
commit
d75bcdd077
4 changed files with 12 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue