On December 11, 2002 02:20 am, Dan Kegel wrote: > /* 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?
I don't, never looked at audio code before, but the above has two changes: The condition has the '2 *' bit in it, and the body of the if has + wwo->dwPlayedTotal = wwo->dwWrittenTotal; The TRACEs are noops, can be ignored. So I suggest trying them out individually, to see which one causes the problem (or maybe they can not be separated). Experimentation will tell. :) -- Dimi.