DSOUND: buffer underrun & sound chunks left out
Tony Lambregts
tony_lambregts at telusplanet.net
Sun Mar 16 11:31:08 CST 2003
Jerry Ji wrote:
> This patch fix two problem:
> 1. the improper play position return by DSOUND_PrimaryGetPosition - beffer
> underrun,
> 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.
>
> NOTE:
> There are still problems with DSBPN_OFFSETSTOP event. If the buffer's state
> is STATE_STOPPED, my patch will set the event each time DSOUND_PerformMix
> called by the timer! I know it's a bad idea, so if anyone have a better
> solution, please re-patch it.
>
> ChangeLog:
> - Fixed buffer underrun & sound chunks left out.
>
First off thankyou for your contribution Your patch is not in the right
format.ie: it can not be read inline and Alexandre can't do
"cat raw_mail | patch -p0"
[...]
------=_NextPart_000_0089_01C2EC19.AE973D80
Content-Type: application/octet-stream;
name="patch.diff"
[....]
- if (playpos) This->last_playpos =3D *playpos;=0A=
+ if (playpos) {=0A=
+ This->last_playpos =3D This->playpos;=0A=
+ This->playpos =3D *playpos;=0A=
+ }=0A=
[....]
Please see section 5.2.1 Inline attachments with Outlook Express. at the
following link.
http://www.winehq.org/Docs/wine-devel/style-notes.shtml
--
Tony Lambregts
More information about the wine-devel
mailing list