output/wasapi: move SetEventHandle() call to thread constructor

This commit is contained in:
Max Kellermann 2021-03-08 17:42:42 +01:00
parent 84a06a72df
commit 980ef82216
1 changed files with 1 additions and 2 deletions

View File

@ -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();
}