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,
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 = MulDiv(latency, 10000000, This->fmt->nSamplesPerSec)
+ This->period_ms * 10000;
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