output/Thread: keep the device open if the audio format hasn't changed

Add another condition to Reopen() which allows keeping it open.
This commit is contained in:
Max Kellermann 2016-12-21 17:45:01 +01:00
parent e5c9f6c1fe
commit d020172181

View File

@ -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