Commit ca18b8ff authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winecoreaudio.drv: Fix latency calculation.

parent b1b0aada
...@@ -1096,6 +1096,9 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface, ...@@ -1096,6 +1096,9 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
} }
latency += stream_latency; latency += stream_latency;
/* pretend we process audio in Period chunks, so max latency includes
* the period time */
latency += DefaultPeriod;
*out = (latency / (double)This->fmt->nSamplesPerSec) * 10000000; *out = (latency / (double)This->fmt->nSamplesPerSec) * 10000000;
OSSpinLockUnlock(&This->lock); OSSpinLockUnlock(&This->lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment