[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: Problem with patch "dsound: Simplify mixing by removing
From: Chris Rankin <rankincj () yahoo ! com>
Date: 2007-06-27 21:03:39
Message-ID: 225307.9695.qm () web52901 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]
--- Maarten Lankhorst <m.b.lankhorst@gmail.com> wrote:
> Don't #if 0 out the code there
>
> Change it to something like this:
>
> if (pmix > This->buflen)
> WARN("Mixing further ahead then buffer is long\n");
Replacing that code with your suggestion means I get lots and lots of messages *with* sound.
Actually, as per someone's suggestion, I am now using this patch instead:
Index: dlls/dsound/buffer.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/buffer.c,v
retrieving revision 1.70
diff -u -r1.70 buffer.c
--- dlls/dsound/buffer.c 22 Jun 2007 12:37:22 -0000 1.70
+++ dlls/dsound/buffer.c 27 Jun 2007 20:47:01 -0000
@@ -443,15 +443,9 @@
TRACE("this back-offset=%d\n", pmix);
- /* sanity */
- if(pmix > This->buflen){
- ERR("Bad length in CalcPlayPosition!\n");
- return 0;
- }
-
/* subtract from our last mixed position */
if (bplay < pmix) bplay += This->buflen; /* wraparound */
- bplay -= pmix;
+ if (bplay >= pmix) bplay -= pmix;
/* check for lead-in */
if (This->leadin && ((bplay < This->startpos) || (bplay > This->buf_mixpos))) {
@@ -462,8 +456,7 @@
/* sanity */
if(bplay > This->buflen){
- ERR("Bad play position in CalcPlayPosition!\n");
- return 0;
+ bplay %= This->buflen;
}
/* return the result */
Cheers,
Chris
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic