Huw Davies (@huw) commented about dlls/winepulse.drv/mmdevdrv.c:
if (!This->stream) {
params.result = AUDCLNT_E_NOT_INITIALIZED;
goto exit;
}
params.stream = This->stream;
pulse_call(start, ¶ms);
if (FAILED(hr = params.result))
return hr;
if (!This->timer_thread) {
This->timer_thread = CreateThread(NULL, 0, pulse_timer_cb, This, 0, NULL);
- WINE_UNIX_CALL(start, ¶ms);
- if (SUCCEEDED(params.result) && !This->timer_thread) {
if (!(This->timer_thread = CreateThread(NULL, 0, pulse_timer_cb, This, 0, NULL))) {
I've approved this MR, but adding code to test `CreateThread()`'s return value is another example of adding a change that shouldn't have been done in this MR. None of the drivers have this, so it either needs to be added to all of them first or done later. For similar reasons, a commit to add the session lock to the coreaudio driver *should* ideally have been included in this MR (just like it was correctly added to the pulse driver in this commit).
Again, the idea is to make all of the drivers' functions as similar as possibly before merging them.