Commit 669d7a6f authored by Max Kellermann's avatar Max Kellermann

output/Thread: move Close() call out of Disable()

parent d600b937
...@@ -77,9 +77,6 @@ AudioOutput::Enable() ...@@ -77,9 +77,6 @@ AudioOutput::Enable()
inline void inline void
AudioOutput::Disable() noexcept AudioOutput::Disable() noexcept
{ {
if (open)
Close(false);
if (really_enabled) { if (really_enabled) {
really_enabled = false; really_enabled = false;
...@@ -206,6 +203,9 @@ AudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format) ...@@ -206,6 +203,9 @@ AudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
inline void inline void
AudioOutputControl::InternalDisable() noexcept AudioOutputControl::InternalDisable() noexcept
{ {
if (output->open)
output->Close(false);
output->Disable(); output->Disable();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment