Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/recognizer.c:
if (status == 1) /* audio_buf_event signaled */
{
while (IAudioCaptureClient_GetBuffer(impl->capture_client, &audio_buf, &frames_available, &flags, NULL, NULL) == S_OK)
{
/* TODO: Send mic data to recognizer and handle results. */
IAudioCaptureClient_ReleaseBuffer(impl->capture_client, frames_available);
}
/* TODO: Send mic data to recognizer and handle results. */
continue;
}
else
{
ERR("Unexpected state entered. Aborting worker!\n");
break;
}
The `if { continue; } / if { continue; } / else ` pattern feels a bit weird. Perhaps `if / else if / else`, or just keep the continues and keep the break without a else.