diff options
| author | 2023-10-13 16:34:31 -0400 | |
|---|---|---|
| committer | 2023-10-13 16:34:31 -0400 | |
| commit | 68ea0a2b72e3bd0a15ce978f864b45ee84af9f9e (patch) | |
| tree | d6906677d8c43a9dee2ac3e8e6c0ee38583a66cc /src | |
| parent | Merge pull request #11772 from v1993/polyfill-thread-fixes (diff) | |
| download | yuzu-68ea0a2b72e3bd0a15ce978f864b45ee84af9f9e.tar.gz yuzu-68ea0a2b72e3bd0a15ce978f864b45ee84af9f9e.tar.xz yuzu-68ea0a2b72e3bd0a15ce978f864b45ee84af9f9e.zip | |
audio: fix shutdown deadlock in audio renderer
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/sink/sink_stream.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index 6081352a2..d66d04fae 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp | |||
| @@ -204,6 +204,10 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz | |||
| 204 | // paused and we'll desync, so just play silence. | 204 | // paused and we'll desync, so just play silence. |
| 205 | if (system.IsPaused() || system.IsShuttingDown()) { | 205 | if (system.IsPaused() || system.IsShuttingDown()) { |
| 206 | if (system.IsShuttingDown()) { | 206 | if (system.IsShuttingDown()) { |
| 207 | { | ||
| 208 | std::scoped_lock lk{release_mutex}; | ||
| 209 | queued_buffers.store(0); | ||
| 210 | } | ||
| 207 | release_cv.notify_one(); | 211 | release_cv.notify_one(); |
| 208 | } | 212 | } |
| 209 | 213 | ||