winealsa: Have GetStreamLatency reflect the ALSA period.

This commit is contained in:
Jörg Höhle 2012-01-05 18:36:43 +01:00 committed by Alexandre Julliard
parent 9bd61f4337
commit 92d8e93acb
1 changed files with 3 additions and 1 deletions

View File

@ -1138,7 +1138,9 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
LeaveCriticalSection(&This->lock);
*latency = 500000;
/* one mmdevapi period plus one period we hide in the ALSA buffer */
*latency = MulDiv(This->alsa_period_frames, 10000000, This->fmt->nSamplesPerSec)
+ This->mmdev_period_rt;
return S_OK;
}