1
0
Fork 0
forked from suyu/suyu

Merge pull request #11778 from liamwhite/audren-shutdown-lock

audio: fix shutdown deadlock in audio renderer
This commit is contained in:
liamwhite 2023-10-14 09:58:17 -04:00 committed by GitHub
commit 36d18e457b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
} }