output/wasapi: Finish() calls Join()
This commit is contained in:
@@ -189,7 +189,11 @@ public:
|
|||||||
SetEventHandle(client, event.handle());
|
SetEventHandle(client, event.handle());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Finish() noexcept { return SetStatus(Status::FINISH); }
|
void Finish() noexcept {
|
||||||
|
SetStatus(Status::FINISH);
|
||||||
|
Join();
|
||||||
|
}
|
||||||
|
|
||||||
void Play() noexcept { return SetStatus(Status::PLAY); }
|
void Play() noexcept { return SetStatus(Status::PLAY); }
|
||||||
void Pause() noexcept { return SetStatus(Status::PAUSE); }
|
void Pause() noexcept { return SetStatus(Status::PAUSE); }
|
||||||
void WaitDataPoped() noexcept { data_poped.Wait(); }
|
void WaitDataPoped() noexcept { data_poped.Wait(); }
|
||||||
@@ -551,7 +555,6 @@ WasapiOutput::Close() noexcept
|
|||||||
}
|
}
|
||||||
is_started = false;
|
is_started = false;
|
||||||
thread->Finish();
|
thread->Finish();
|
||||||
thread->Join();
|
|
||||||
com_worker->Async([&]() {
|
com_worker->Async([&]() {
|
||||||
thread.reset();
|
thread.reset();
|
||||||
client.reset();
|
client.reset();
|
||||||
|
Reference in New Issue
Block a user