Commit 9bd61f43 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

winecoreaudio: Fix latency calculation.

parent acd8d60f
...@@ -1210,8 +1210,8 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface, ...@@ -1210,8 +1210,8 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
latency += stream_latency; latency += stream_latency;
/* pretend we process audio in Period chunks, so max latency includes /* pretend we process audio in Period chunks, so max latency includes
* the period time */ * the period time */
latency += DefaultPeriod; *out = MulDiv(latency, 10000000, This->fmt->nSamplesPerSec)
*out = (latency / (double)This->fmt->nSamplesPerSec) * 10000000; + This->period_ms * 10000;
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