summaryrefslogtreecommitdiff
path: root/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/plugins/wasapi/WasapiOutputPlugin.cxx')
-rw-r--r--src/output/plugins/wasapi/WasapiOutputPlugin.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
index e023725bd..4f6068a5e 100644
--- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
@@ -189,7 +189,11 @@ public:
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 Pause() noexcept { return SetStatus(Status::PAUSE); }
void WaitDataPoped() noexcept { data_poped.Wait(); }
@@ -551,7 +555,6 @@ WasapiOutput::Close() noexcept
}
is_started = false;
thread->Finish();
- thread->Join();
com_worker->Async([&]() {
thread.reset();
client.reset();