diff options
author | Max Kellermann <max@musicpd.org> | 2021-03-08 22:28:17 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-03-08 22:28:36 +0100 |
commit | 01d3c2705e93ce4cf83cb2ed223ed6311ef19fd5 (patch) | |
tree | 9421956d701219cd8b8b76392900c447e7031c97 /src/output | |
parent | 29346dc9c54fd0d469edcf7e4ff9558454d01554 (diff) |
output/wasapi: Finish() calls Join()
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/plugins/wasapi/WasapiOutputPlugin.cxx | 7 |
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(); |