Commit 920ef0fb authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

When we get down to the last fragment or two in our output to the DSP,

we should use the SND_DSP_POST ioctl to let the sound card know to flush those fragments. This allows us to precisely know when the buffer is empty, and fixes another set of winmm tests.
parent 1b685779
...@@ -1665,12 +1665,13 @@ static DWORD wodPlayer_FeedDSP(WINE_WAVEOUT* wwo) ...@@ -1665,12 +1665,13 @@ static DWORD wodPlayer_FeedDSP(WINE_WAVEOUT* wwo)
/* input queue empty and output buffer with less than one fragment to play /* input queue empty and output buffer with less than one fragment to play
* actually some cards do not play the fragment before the last if this one is partially feed * actually some cards do not play the fragment before the last if this one is partially feed
* so we need to test for full the availability of 2 fragments * so we need to test for full the availability of 2 fragments ; the DSP_POST ioctl
* will let the card know to play out the rest of the fragments
*/ */
if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize && if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize &&
!wwo->bNeedPost) { !wwo->bNeedPost) {
TRACE("Run out of wavehdr:s...\n"); TRACE("Run out of wavehdr's, requesting a POST...\n");
return INFINITE; wwo->bNeedPost = TRUE;
} }
/* no more room... no need to try to feed */ /* no more room... no need to try to feed */
......
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