output/Control: move code from FinishDestroy() to destructor

This commit is contained in:
Max Kellermann
2018-01-04 10:34:27 +01:00
parent a5b93008f5
commit 7574dfd339
3 changed files with 2 additions and 17 deletions
+2 -13
View File
@@ -46,10 +46,8 @@ AudioOutputControl::AudioOutputControl(std::unique_ptr<FilteredAudioOutput> _out
AudioOutputControl::~AudioOutputControl() noexcept
{
assert(!fail_timer.IsDefined());
assert(!thread.IsDefined());
assert(output == nullptr);
assert(!open);
if (thread.IsDefined())
thread.Join();
}
void
@@ -376,12 +374,3 @@ AudioOutputControl::BeginDestroy() noexcept
CommandAsync(Command::KILL);
}
}
void
AudioOutputControl::FinishDestroy() noexcept
{
if (thread.IsDefined())
thread.Join();
output.reset();
}