From d020172181f1326dff5ce3970c0620ebf68cfb01 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 21 Dec 2016 17:45:01 +0100 Subject: [PATCH] output/Thread: keep the device open if the audio format hasn't changed Add another condition to Reopen() which allows keeping it open. --- src/output/OutputThread.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index 42a97b2bd..bb29e0ca3 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -284,7 +284,8 @@ AudioOutput::Reopen() { assert(open); - if (!config_audio_format.IsFullyDefined()) { + if (request.audio_format != in_audio_format && + !config_audio_format.IsFullyDefined()) { Close(true); Open(); } else