Re: DSOUND: buffer underrun & sound chunks left out (RESEND)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ove Kaaven wrote:
man, 2003-03-17 kl. 10:06 skrev Jerry Ji:

This patch fix two problem:
1. the improper play position return by DSOUND_PrimaryGetPosition - beffer underrun,


I guess this should be considered a bug in wineoss (or maybe your kernel
drivers), but it's not a dsound bug and should not be fixed by reducing
the readout precision of drivers that actually work properly. I don't
think your buffer.c patch is very correct either, it would cause
spurious noise under some circumstances.

Actually, it happend when I use winarts, wineoss has already supported IDsDriverBuffer, which works fine. As I said, DSOUND_PerformMix and IDirectSoundBufferImpl_GetCurrentPosition use their own code to get the primary play position. I don't know why they don't call DSOUND_PrimaryGetPosition, have they already experienced the same problem? Beside that, my system is RadHat 8.0, all packages were installed from the compact discs except alsa-driver0.9.0rc7, none of them was updated.

2. and the notify mechanics we used - sound data skipped.

Please refer to the comment for the first problem.

DSOUND_CheckEvent(IDirectSoundBufferImpl *dsb, int len) original use current play position and the count of data TO BE played to check if a notify should be generated. That's to say, an application may be notified before the data at the desired offset really played. Since the application got the notify that the data in it's demand region is useless (played), it might call IDirectSoundBufferImpl_Lock to lock this region, which contains useful data, IDirectSoundBufferImpl_Lock will handle the conflict by cancelling the region by default.


Here's my fix for the problem in WineX, and it's supposed to be able to
handle the OFFSETSTOP case. I think it should apply to Wine without too
much trouble.

I'm glad to know you have a better patch. Should wine also accept the patches that accepted by WineX? If I had gotten your patch earlier, maybe I can save some time.

Log:
Ove Kaaven <ovek@transgaming.com>
Somewhat more reliable dsound position notifications.

Index: mixer.c
===================================================================
RCS file: /cvsroot/winex/wine/dlls/dsound/mixer.c,v
retrieving revision 1.8
retrieving revision 1.10
diff -u -r1.8 -r1.10
--- mixer.c	1 Oct 2002 13:51:32 -0000	1.8
+++ mixer.c	14 Feb 2003 22:04:28 -0000	1.10
...





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux