Don't apply this; more survey of alternate sound cards shows that DSP_POST does not work as well as advertised everywhere.
Jer
Jeremy White wrote:
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.
Index: dlls/winmm/wineoss/audio.c
RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v retrieving revision 1.152 diff -u -r1.152 audio.c --- dlls/winmm/wineoss/audio.c 28 Jan 2005 17:21:07 -0000 1.152 +++ dlls/winmm/wineoss/audio.c 22 Feb 2005 22:17:22 -0000 @@ -1665,12 +1665,13 @@
/* 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
if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize && !wwo->bNeedPost) {* will let the card know to play out the rest of the fragments */
- 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 */