Commit 97215773 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

Revert "quartz: Fill up sound buffer while in paused state.".

This reverts commit e5917001. It's not fixing the real issue, filling up buffer while paused is actually capable of producing quite a few headaches to get it working right.
parent ecc551b9
...@@ -146,9 +146,7 @@ static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_write ...@@ -146,9 +146,7 @@ static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_write
DSoundRender_UpdatePositions(This, &writepos, &min_writepos); DSoundRender_UpdatePositions(This, &writepos, &min_writepos);
playpos = This->last_playpos; playpos = This->last_playpos;
if (This->filter.state == State_Paused) { if (This->filter.pClock == (IReferenceClock*)&This->IReferenceClock_vtbl) {
write_at = cur = -1;
} else if (This->filter.pClock == (IReferenceClock*)&This->IReferenceClock_vtbl) {
max_lag = min_lag; max_lag = min_lag;
cur = This->play_time + time_from_pos(This, playpos); cur = This->play_time + time_from_pos(This, playpos);
cur -= This->filter.rtStreamStart; cur -= This->filter.rtStreamStart;
...@@ -228,10 +226,12 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM ...@@ -228,10 +226,12 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM
DWORD writepos, skip = 0, free, size1, size2, ret; DWORD writepos, skip = 0, free, size1, size2, ret;
BYTE *buf1, *buf2; BYTE *buf1, *buf2;
hr = DSoundRender_GetWritePos(This, &writepos, tStart, &free, &skip); if (This->filter.state == State_Running)
hr = DSoundRender_GetWritePos(This, &writepos, tStart, &free, &skip);
else
hr = S_FALSE;
if (hr != S_OK) { if (hr != S_OK) {
SetEvent(This->state_change);
This->in_loop = 1; This->in_loop = 1;
LeaveCriticalSection(&This->filter.csFilter); LeaveCriticalSection(&This->filter.csFilter);
ret = WaitForSingleObject(This->blocked, 10); ret = WaitForSingleObject(This->blocked, 10);
...@@ -251,7 +251,7 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM ...@@ -251,7 +251,7 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM
if (skip) if (skip)
FIXME("Sample dropped %u of %u bytes\n", skip, size); FIXME("Sample dropped %u of %u bytes\n", skip, size);
if (skip >= size) if (skip >= size)
break; return S_OK;
data += skip; data += skip;
size -= skip; size -= skip;
...@@ -362,6 +362,7 @@ static HRESULT WINAPI DSoundRender_Receive(BaseInputPin *pin, IMediaSample * pSa ...@@ -362,6 +362,7 @@ static HRESULT WINAPI DSoundRender_Receive(BaseInputPin *pin, IMediaSample * pSa
cbSrcStream = IMediaSample_GetActualDataLength(pSample); cbSrcStream = IMediaSample_GetActualDataLength(pSample);
TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream); TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
SetEvent(This->state_change);
hr = DSoundRender_SendSampleData(This, tStart, tStop, pbSrcStream, cbSrcStream); hr = DSoundRender_SendSampleData(This, tStart, tStop, pbSrcStream, cbSrcStream);
LeaveCriticalSection(&This->filter.csFilter); LeaveCriticalSection(&This->filter.csFilter);
return hr; return hr;
......
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