From 669d7a6feb47d75475ac4a4439a5e7e8c54ddba1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Jun 2017 09:34:24 +0200 Subject: [PATCH] output/Thread: move Close() call out of Disable() --- src/output/Thread.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output/Thread.cxx b/src/output/Thread.cxx index 99cd8df5e..b2f2fde4c 100644 --- a/src/output/Thread.cxx +++ b/src/output/Thread.cxx @@ -77,9 +77,6 @@ AudioOutput::Enable() inline void AudioOutput::Disable() noexcept { - if (open) - Close(false); - if (really_enabled) { really_enabled = false; @@ -206,6 +203,9 @@ AudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format) inline void AudioOutputControl::InternalDisable() noexcept { + if (output->open) + output->Close(false); + output->Disable(); }