summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-09-24 07:40:30 +0200
committerGitHub <noreply@github.com>2022-09-24 07:40:30 +0200
commit1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e (patch)
tree324d371a8a8ecedb7f24b147415e11e81f7e7065
parentMerge pull request #8945 from Tachi107/typos (diff)
parentDo not try to pause core timing from the audio thread when using single-core (diff)
downloadyuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.tar
yuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.tar.gz
yuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.tar.bz2
yuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.tar.lz
yuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.tar.xz
yuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.tar.zst
yuzu-1b1b99fbd5b1c2fbe4a99c90f5bf73b4502e7c9e.zip
-rw-r--r--src/audio_core/sink/sink_stream.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp
index 37fe725e4..849f862b0 100644
--- a/src/audio_core/sink/sink_stream.cpp
+++ b/src/audio_core/sink/sink_stream.cpp
@@ -214,8 +214,13 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
// video play out without attempting to stall.
// Can hopefully remove this later with a more complete NVDEC implementation.
const auto nvdec_active{system.AudioCore().IsNVDECActive()};
- if (!nvdec_active && queued_buffers > max_queue_size) {
+
+ // Core timing cannot be paused in single-core mode, so Stall ends up being called over and over
+ // and never recovers to a normal state, so just skip attempting to sync things on single-core.
+ if (system.IsMulticore() && !nvdec_active && queued_buffers > max_queue_size) {
Stall();
+ } else if (system.IsMulticore() && queued_buffers <= max_queue_size) {
+ Unstall();
}
while (frames_written < num_frames) {
@@ -255,7 +260,7 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
std::memcpy(&last_frame[0], &output_buffer[(frames_written - 1) * frame_size],
frame_size_bytes);
- if (stalled && queued_buffers <= max_queue_size) {
+ if (system.IsMulticore() && queued_buffers <= max_queue_size) {
Unstall();
}
}