Huw Davies (@huw) commented about dlls/winealsa.drv/alsa.c:
snd_pcm_sw_params_t *sw_params = NULL; snd_pcm_format_t format; unsigned int rate, alsa_period_us, i;
- WAVEFORMATEXTENSIBLE *fmtex;
WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE *)params->fmt; int err; SIZE_T size;
/* We don't return early as priority is given to the other errors. */
params->result = *params->stream ? AUDCLNT_E_ALREADY_INITIALIZED : S_OK;
I don't think we want this check in the drivers. The idea is that the assignment of `stream` to `This->stream` on the PE-side happens only when the stream has been created so that other threads can freely use it. If the other errors really need to take precedence then we'll have to create the stream unconditionally on `This->stream` and then destroy it later if `This->stream` is set.