=================================================================== RCS file: /home/wine/wine/dlls/winmm/wineoss/Attic/audio.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -p -r1.67 -r1.68 --- wine/dlls/winmm/wineoss/Attic/audio.c 2002/12/15 01:12:47 1.67 +++ wine/dlls/winmm/wineoss/Attic/audio.c 2002/12/15 02:59:13 1.68 @@ -1152,8 +1152,12 @@ static DWORD wodPlayer_FeedDSP(WINE_WAVE TRACE("fragments=%d/%d, fragsize=%d, bytes=%d\n", dspspace.fragments, dspspace.fragstotal, dspspace.fragsize, dspspace.bytes); - /* input queue empty and output buffer with less than one fragment to play */ - if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + wwo->dwFragmentSize) { + /* 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 + */ + if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize && + !wwo->bNeedPost) { TRACE("Run out of wavehdr:s...\n"); return INFINITE; } @@ -1221,8 +1225,8 @@ static DWORD CALLBACK wodPlayer(LPVOID p TRACE("flushing\n"); ioctl(wwo->ossdev->fd, SNDCTL_DSP_SYNC, 0); wwo->dwPlayedTotal = wwo->dwWrittenTotal; - } - else { + dwNextNotifyTime = wodPlayer_NotifyCompletions(wwo, FALSE); + } else { TRACE("recovering\n"); dwNextFeedTime = wodPlayer_FeedDSP(wwo); }