Commit 3f598560 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

winealsa: Don't commit data on Stop and Play.

parent decd2d81
......@@ -587,7 +587,6 @@ static HRESULT WINAPI IDsDriverBufferImpl_Play(PIDSDRIVERBUFFER iface, DWORD dwR
/* **** */
EnterCriticalSection(&This->pcm_crst);
CommitAll(This);
snd_pcm_start(This->pcm);
/* **** */
LeaveCriticalSection(&This->pcm_crst);
......@@ -607,10 +606,11 @@ static HRESULT WINAPI IDsDriverBufferImpl_Stop(PIDSDRIVERBUFFER iface)
avail = This->mmap_buflen_frames;
snd_pcm_drop(This->pcm);
snd_pcm_prepare(This->pcm);
avail = snd_pcm_avail_update(This->pcm);
snd_pcm_mmap_begin(This->pcm, &areas, &This->mmap_pos, &avail);
snd_pcm_hw_params_get_format(This->hw_params, &format);
snd_pcm_format_set_silence(format, areas->addr, This->mmap_buflen_frames);
This->mmap_pos += snd_pcm_mmap_commit(This->pcm, This->mmap_pos, avail);
snd_pcm_mmap_commit(This->pcm, This->mmap_pos, 0);
/* **** */
LeaveCriticalSection(&This->pcm_crst);
......
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