summaryrefslogtreecommitdiff
path: root/src/audio_core/sink
diff options
context:
space:
mode:
authorGravatar Kelebek12023-05-10 17:59:21 +0100
committerGravatar Kelebek12023-05-18 13:03:32 +0100
commitd75bcdd07793954e6c33ba131871c183492b32b0 (patch)
treedcdacfe32430c6a33553dc7ae440c4a7011ef9ab /src/audio_core/sink
parentMerge pull request #10365 from lat9nq/anv_push_descriptor (diff)
downloadyuzu-d75bcdd07793954e6c33ba131871c183492b32b0.tar.gz
yuzu-d75bcdd07793954e6c33ba131871c183492b32b0.tar.xz
yuzu-d75bcdd07793954e6c33ba131871c183492b32b0.zip
Smooth out the DSP callback by adding a 5ms wait time limit
Diffstat (limited to 'src/audio_core/sink')
-rw-r--r--src/audio_core/sink/sink_stream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp
index 13ba26e74..9bbb54162 100644
--- a/src/audio_core/sink/sink_stream.cpp
+++ b/src/audio_core/sink/sink_stream.cpp
@@ -271,8 +271,8 @@ u64 SinkStream::GetExpectedPlayedSampleCount() {
271 271
272void SinkStream::WaitFreeSpace() { 272void SinkStream::WaitFreeSpace() {
273 std::unique_lock lk{release_mutex}; 273 std::unique_lock lk{release_mutex};
274 release_cv.wait( 274 release_cv.wait_for(lk, std::chrono::milliseconds(5),
275 lk, [this]() { return queued_buffers < max_queue_size || system.IsShuttingDown(); }); 275 [this]() { return queued_buffers < max_queue_size; });
276} 276}
277 277
278} // namespace AudioCore::Sink 278} // namespace AudioCore::Sink