From 920ef0fbc9d74dfeb985ab7dc0d149b12d28924a Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Wed, 23 Feb 2005 12:43:04 +0000 Subject: [PATCH] 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. --- dlls/winmm/wineoss/audio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c index 00670a22c5f..9e0291066d9 100644 --- a/dlls/winmm/wineoss/audio.c +++ b/dlls/winmm/wineoss/audio.c @@ -1665,12 +1665,13 @@ static DWORD wodPlayer_FeedDSP(WINE_WAVEOUT* wwo) /* 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 - * 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 && !wwo->bNeedPost) { - TRACE("Run out of wavehdr:s...\n"); - return INFINITE; + TRACE("Run out of wavehdr's, requesting a POST...\n"); + wwo->bNeedPost = TRUE; } /* no more room... no need to try to feed */