Commit 2e13bf77 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Check that we are still playing in wodUpdatePlayedTotal(). If not,

then the value returned by snd_pcm_delay() is not usable so assume delay=0. This gets the winmm test to complete in interactive mode with winealsa.
parent cc3a95c6
......@@ -998,10 +998,12 @@ static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD
*/
static BOOL wodUpdatePlayedTotal(WINE_WAVEOUT* wwo, snd_pcm_status_t* ps)
{
snd_pcm_sframes_t delay = 0;
snd_pcm_delay(wwo->p_handle, &delay);
wwo->dwPlayedTotal = wwo->dwWrittenTotal - snd_pcm_frames_to_bytes(wwo->p_handle, delay);
return TRUE;
snd_pcm_sframes_t delay = 0;
snd_pcm_delay(wwo->p_handle, &delay);
if (snd_pcm_state(wwo->p_handle) != SND_PCM_STATE_RUNNING)
delay=0;
wwo->dwPlayedTotal = wwo->dwWrittenTotal - snd_pcm_frames_to_bytes(wwo->p_handle, delay);
return TRUE;
}
/**************************************************************************
......
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