1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

winecoreaudio: Remove superfluous timing adjustment.

This commit is contained in:
Davide Beatrici 2024-05-02 00:24:18 +02:00 committed by Alexandre Julliard
parent 42e471f5c6
commit f8d374e8ed

View File

@ -725,37 +725,6 @@ static NTSTATUS unix_create_stream(void *args)
params->result = S_OK;
if (params->share == AUDCLNT_SHAREMODE_SHARED) {
params->period = def_period;
if (params->duration < 3 * params->period)
params->duration = 3 * params->period;
} else {
const WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE *)params->fmt;
if (fmtex->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
(fmtex->dwChannelMask == 0 || fmtex->dwChannelMask & SPEAKER_RESERVED))
params->result = AUDCLNT_E_UNSUPPORTED_FORMAT;
else {
if (!params->period)
params->period = def_period;
if (params->period < min_period || params->period > 5000000)
params->result = AUDCLNT_E_INVALID_DEVICE_PERIOD;
else if (params->duration > 20000000) /* The smaller the period, the lower this limit. */
params->result = AUDCLNT_E_BUFFER_SIZE_ERROR;
else if (params->flags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) {
if (params->duration != params->period)
params->result = AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL;
FIXME("EXCLUSIVE mode with EVENTCALLBACK\n");
params->result = AUDCLNT_E_DEVICE_IN_USE;
} else if (params->duration < 8 * params->period)
params->duration = 8 * params->period; /* May grow above 2s. */
}
}
if (FAILED(params->result))
return STATUS_SUCCESS;
if (!(stream = calloc(1, sizeof(*stream)))) {
params->result = E_OUTOFMEMORY;
return STATUS_SUCCESS;