Commit cb4889d9 authored by Sagar Mittal's avatar Sagar Mittal Committed by Alexandre Julliard

quartz: DSoundRender: Do not overwrite a full buffer.

parent 5c07d88e
......@@ -179,6 +179,13 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, LPBYTE data,
else
buf_free = DSBUFFERSIZE - This->write_pos + play_pos;
/* This situation is ambiguous; Assume full when playing */
if(buf_free == DSBUFFERSIZE && This->started)
{
Sleep(10);
continue;
}
size2 = min(buf_free, size);
hr = IDirectSoundBuffer_Lock(This->dsbuffer, This->write_pos, size2, &lpbuf1, &dwsize1, &lpbuf2, &dwsize2, 0);
if (hr != DS_OK) {
......
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