winecoreaudio: Fix latency calculation.

This commit is contained in:
Jörg Höhle 2012-01-05 22:09:47 +01:00 committed by Alexandre Julliard
parent acd8d60faa
commit 9bd61f4337
1 changed files with 2 additions and 2 deletions

View File

@ -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);