summaryrefslogtreecommitdiff
path: root/src/audio_core/sink
diff options
context:
space:
mode:
authorGravatar Kelebek12022-09-04 05:41:06 +0100
committerGravatar Kelebek12022-09-04 05:41:06 +0100
commit2129d040a509754839b82b1ff6d387cb4f84f168 (patch)
treedcbc4edfb20e70e4c22566193c802ea2f4b9979e /src/audio_core/sink
parentRework audio output, connecting AudioOut into coretiming to fix desync during... (diff)
downloadyuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.gz
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.xz
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.zip
Don't stall with nvdec
Diffstat (limited to 'src/audio_core/sink')
-rw-r--r--src/audio_core/sink/sink_stream.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp
index 3770c515d..24636e512 100644
--- a/src/audio_core/sink/sink_stream.cpp
+++ b/src/audio_core/sink/sink_stream.cpp
@@ -9,6 +9,7 @@
9#include <span> 9#include <span>
10#include <vector> 10#include <vector>
11 11
12#include "audio_core/audio_core.h"
12#include "audio_core/common/common.h" 13#include "audio_core/common/common.h"
13#include "audio_core/sink/sink_stream.h" 14#include "audio_core/sink/sink_stream.h"
14#include "common/common_types.h" 15#include "common/common_types.h"
@@ -194,7 +195,12 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
194 const std::size_t frame_size_bytes = frame_size * sizeof(s16); 195 const std::size_t frame_size_bytes = frame_size * sizeof(s16);
195 size_t frames_written{0}; 196 size_t frames_written{0};
196 197
197 if (queued_buffers > max_queue_size) { 198 // Due to many frames being queued up with nvdec (5 frames or so?), a lot of buffers also get
199 // queued up (30+) but not all at once, which causes constant stalling here, so just let the
200 // video play out without attempting to stall.
201 // Can hopefully remove this later with a more complete NVDEC implementation.
202 const auto nvdec_active{system.AudioCore().IsNVDECActive()};
203 if (!nvdec_active && queued_buffers > max_queue_size) {
198 Stall(); 204 Stall();
199 } 205 }
200 206