[patch] revert part of Aug 26 change in winmm/wineoss/audio.c that broke msvc++4.0 installer?

Dan Kegel dank at kegel.com
Wed Dec 11 01:20:41 CST 2002


Dimitrie O. Paun wrote:
> On December 11, 2002 01:48 am, Dan Kegel wrote:
> 
>>I've tracked it down further.  Attached find a trace+wave and
>>a patch that reverts half of Ove's patch from August, thereby
>>"fixing" the problem.
> 
> I suggest leaving the noops in, so you minimize the size of
> the patch, and thus narrow down the bug even further.

Thanks for the encouragement.  I think I have it.  Here's
the smallest reversion that fixes the problem for me:

--- wine-20021125/dlls/winmm/wineoss/audio.c	2002-11-04 14:39:19.000000000 -0800
+++ wine-20021125/dlls/winmm/wineoss/audio.c.spam	2002-12-10 22:57:27.000000000 -0800
@@ -1148,8 +1147,10 @@
  	  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) {
-	TRACE("Run out of wavehdr:s...\n");
+    if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize) {
+        TRACE("Run out of wavehdr:s... flushing (%lu => %lu)\n",
+              wwo->dwPlayedTotal, wwo->dwWrittenTotal);
+        wwo->dwPlayedTotal = wwo->dwWrittenTotal;
          return INFINITE;
      }


Can someone who understands the code comment?

Thanks,
Dan




More information about the wine-devel mailing list