From 0227af5bb7495b8a167ef9067d8f5e5563e9933a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Jan 2018 10:29:27 +0100 Subject: [PATCH] output/Filtered: remove BeginDestroy() All it does is "sometimes" close the mixer, but that is also done in the destructor. --- src/output/Control.cxx | 2 -- src/output/Filtered.hxx | 2 -- src/output/Finish.cxx | 7 ------- 3 files changed, 11 deletions(-) diff --git a/src/output/Control.cxx b/src/output/Control.cxx index 8a91f22c7..1dc45a6b4 100644 --- a/src/output/Control.cxx +++ b/src/output/Control.cxx @@ -371,8 +371,6 @@ AudioOutputControl::LockCloseWait() noexcept void AudioOutputControl::BeginDestroy() noexcept { - output->BeginDestroy(); - if (thread.IsDefined()) { const std::lock_guard protect(mutex); CommandAsync(Command::KILL); diff --git a/src/output/Filtered.hxx b/src/output/Filtered.hxx index 1d20bad17..3d79c193b 100644 --- a/src/output/Filtered.hxx +++ b/src/output/Filtered.hxx @@ -141,8 +141,6 @@ public: MixerListener &mixer_listener, const ConfigBlock &block); - void BeginDestroy() noexcept; - const char *GetName() const { return name; } diff --git a/src/output/Finish.cxx b/src/output/Finish.cxx index bdaad0e9b..265f3178a 100644 --- a/src/output/Finish.cxx +++ b/src/output/Finish.cxx @@ -28,10 +28,3 @@ FilteredAudioOutput::~FilteredAudioOutput() if (mixer != nullptr) mixer_free(mixer); } - -void -FilteredAudioOutput::BeginDestroy() noexcept -{ - if (mixer != nullptr) - mixer_auto_close(mixer); -}