Davide Beatrici (@davidebeatrici) commented about dlls/mmdevapi/client.c:
*period = def_period; if (*period < min_period || *period > 5000000)
hr = AUDCLNT_E_INVALID_DEVICE_PERIOD;
return AUDCLNT_E_INVALID_DEVICE_PERIOD; else if (*duration > 20000000) /* The smaller the period, the lower this limit. */
hr = AUDCLNT_E_BUFFER_SIZE_ERROR;
return AUDCLNT_E_BUFFER_SIZE_ERROR; else if (flags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) { if (*duration != *period)
hr = AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL;
return AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL; FIXME("EXCLUSIVE mode with EVENTCALLBACK\n");
hr = AUDCLNT_E_DEVICE_IN_USE;
return AUDCLNT_E_DEVICE_IN_USE;
Technically `AUDCLNT_E_DEVICE_IN_USE` being returned instead of `AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL` could have been considered a bug, but in practice it doesn't matter as we don't support the mode.