Commit 7732db0a authored by Max Kellermann's avatar Max Kellermann

output/Control: move code to method StopThread()

parent 37f984ba
......@@ -38,10 +38,7 @@ AudioOutputControl::AudioOutputControl(std::unique_ptr<FilteredAudioOutput> _out
AudioOutputControl::~AudioOutputControl() noexcept
{
BeginDestroy();
if (thread.IsDefined())
thread.Join();
StopThread();
}
void
......@@ -383,3 +380,14 @@ AudioOutputControl::BeginDestroy() noexcept
}
}
}
void
AudioOutputControl::StopThread() noexcept
{
BeginDestroy();
if (thread.IsDefined())
thread.Join();
assert(IsCommandFinished());
}
......@@ -566,6 +566,8 @@ private:
*/
void InternalDrain() noexcept;
void StopThread() noexcept;
/**
* The OutputThread.
*/
......
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