diff options
| -rw-r--r-- | src/audio_core/sink/sink_stream.cpp | 9 |
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 | |||
| 214 | // video play out without attempting to stall. | 214 | // video play out without attempting to stall. |
| 215 | // Can hopefully remove this later with a more complete NVDEC implementation. | 215 | // Can hopefully remove this later with a more complete NVDEC implementation. |
| 216 | const auto nvdec_active{system.AudioCore().IsNVDECActive()}; | 216 | const auto nvdec_active{system.AudioCore().IsNVDECActive()}; |
| 217 | if (!nvdec_active && queued_buffers > max_queue_size) { | 217 | |
| 218 | // Core timing cannot be paused in single-core mode, so Stall ends up being called over and over | ||
| 219 | // and never recovers to a normal state, so just skip attempting to sync things on single-core. | ||
| 220 | if (system.IsMulticore() && !nvdec_active && queued_buffers > max_queue_size) { | ||
| 218 | Stall(); | 221 | Stall(); |
| 222 | } else if (system.IsMulticore() && queued_buffers <= max_queue_size) { | ||
| 223 | Unstall(); | ||
| 219 | } | 224 | } |
| 220 | 225 | ||
| 221 | while (frames_written < num_frames) { | 226 | while (frames_written < num_frames) { |
| @@ -255,7 +260,7 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz | |||
| 255 | std::memcpy(&last_frame[0], &output_buffer[(frames_written - 1) * frame_size], | 260 | std::memcpy(&last_frame[0], &output_buffer[(frames_written - 1) * frame_size], |
| 256 | frame_size_bytes); | 261 | frame_size_bytes); |
| 257 | 262 | ||
| 258 | if (stalled && queued_buffers <= max_queue_size) { | 263 | if (system.IsMulticore() && queued_buffers <= max_queue_size) { |
| 259 | Unstall(); | 264 | Unstall(); |
| 260 | } | 265 | } |
| 261 | } | 266 | } |