mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 03:13:15 -06:00
audio: fix shutdown deadlock in audio renderer
This commit is contained in:
parent
a8bd02acd8
commit
68ea0a2b72
1 changed files with 4 additions and 0 deletions
|
@ -204,6 +204,10 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
|
||||||
// paused and we'll desync, so just play silence.
|
// paused and we'll desync, so just play silence.
|
||||||
if (system.IsPaused() || system.IsShuttingDown()) {
|
if (system.IsPaused() || system.IsShuttingDown()) {
|
||||||
if (system.IsShuttingDown()) {
|
if (system.IsShuttingDown()) {
|
||||||
|
{
|
||||||
|
std::scoped_lock lk{release_mutex};
|
||||||
|
queued_buffers.store(0);
|
||||||
|
}
|
||||||
release_cv.notify_one();
|
release_cv.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue