mirror of
https://github.com/wine-mirror/wine
synced 2024-07-01 07:14:31 +00:00
winecoreaudio: Remove superfluous timing adjustment.
This commit is contained in:
parent
42e471f5c6
commit
f8d374e8ed
|
@ -725,37 +725,6 @@ static NTSTATUS unix_create_stream(void *args)
|
||||||
|
|
||||||
params->result = S_OK;
|
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)))) {
|
if (!(stream = calloc(1, sizeof(*stream)))) {
|
||||||
params->result = E_OUTOFMEMORY;
|
params->result = E_OUTOFMEMORY;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user