output/Control: move code to method StopThread()
This commit is contained in:
parent
37f984ba74
commit
7732db0aee
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user