diff options
author | Max Kellermann <max@musicpd.org> | 2021-03-08 17:42:42 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-03-08 17:52:44 +0100 |
commit | 980ef822163c5b7b32f561c28724624dfce6105d (patch) | |
tree | 656481a8f0a596646fe9daa0cbcbb69d273c99c2 /src/output | |
parent | 84a06a72dfd67508e0fbffdc78b543f56fc7a0a9 (diff) |
output/wasapi: move SetEventHandle() call to thread constructor
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/plugins/wasapi/WasapiOutputPlugin.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx index 3dfdd61fc..afe1c3e3c 100644 --- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx +++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx @@ -187,6 +187,7 @@ public: buffer_size_in_frames(_buffer_size_in_frames), is_exclusive(_is_exclusive), spsc_buffer(_buffer_size_in_frames * 4 * _frame_size) { + SetEventHandle(*client, event.handle()); } void Finish() noexcept { return SetStatus(Status::FINISH); } @@ -545,8 +546,6 @@ WasapiOutput::DoOpen(AudioFormat &audio_format) thread.emplace(client.get(), std::move(render_client), FrameSize(), buffer_size_in_frames, is_exclusive); - SetEventHandle(*client, thread->event.handle()); - thread->Start(); } |