[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame Mixer Crackle noise not an SDL_Mixer problem



Beat Nicholas. It is revision 1143 (need 1146 to compile) that breaks things. 
It deals with an SDL_mixer bug where the stereo channels are reversed for 8 bit 
sound. I wonder if this is our culprit:

==== From around line 160 in mixer.c ===============
     /*make chunk a power of 2*/
     for (i = 0; 1 << i < chunk; ++i); //yes, semicolon on for loop
     chunk = MAX (1 << i, 256);
==== To around line 167 ============================ 
     /*make chunk a power of 2*/ 
     for (i = 0; 1 << i < chunk; ++i) { 
     chunk = MAX (1 << i, 256);
     }

Lenard


Quoting René Dudfield <renesd@xxxxxxxxx>:

> This would be a good script to add to pygame for the google testing
> project by Nicholas...
> 
> test_between_revisions.py r990 r1175 run_tests.py
> 
> Then it could to a bisect build, and test between the revisions.  It
> could take a file name to run between revisions.  So you could pass it
> a file to run tests for you.
> 
> eg. for this bug it could be:
> test_between_revisions.py r990 r1175 tests/manual/music.py
> 
> It would download, and build them all, then run the tests.
> 
> 
> cu,
> 
> 
> On Thu, Apr 24, 2008 at 11:13 AM, Brian Fisher
> <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> > sweet, you rock. with 185 revisions between, then it only takes 8 more
> > get-build-test cycles to narrow it down to a single change :)
> >
> >
> >
> > On Wed, Apr 23, 2008 at 4:22 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> >
> > > I have been going through SVN. I have narrowed the problem to between
> > revisions 990 (1.0.0 rc 0) and 1175 (1.8.0release). SDL may be involved
> only
> > indirectly. Simple C programs using it don't have the problem. It could be
> > Pygame doing something it shouldn't. Of course Pygame could be exposing an
> > SDL problem that has remained dormant until now.
> > >
> > > Lenard
> > >
> > >
> > > Brian Fisher wrote:
> > >
> > > >
> > > > Your test demonstrates that 1.8 changes are required to cause the
> > problem, but clearly SDL is involved, otherwise why would waveout solve
> the
> > problem as well? If possible, a test of pygame 1.8 against the 1.7 SDL
> > versions could still help solve the case.
> > > >
> > > > maybe in order to figure out what pygame 1.8 change made the crackling
> > start happen, you could binary search against svn revisions? i.e. if
> pygame
> > 1.8 was rev. 1200 and 1.7 was rev 600 (made up numbers) then try rev. 900?
> > > >
> > > >
> > > > On Wed, Apr 23, 2008 at 8:42 AM, Lenard Lindstrom <len-l@xxxxxxxxx
> > <mailto:len-l@xxxxxxxxx>> wrote:
> > > >
> > > >    I have narrowed the problem some. It has something to do with
> > > >    Pygame 1.8, not
> > > >    SDL. I built Pygame 1.7 and linked against the 1.8 prebuilts. The
> > > >    crackling
> > > >    went away. I don't know if anyone else thought to move the 1.8
> > > >    dependencies to
> > > >    1.7. And it definitely involves the SDL DirectX audio driver.
> > > >    Changes to that
> > > >    driver improved sound quality for 1.8, though it did not
> > > >    completely eliminate
> > > >    the noise. I fear it is another memory access problem. Let's hope
> > > >    it was
> > > >    introduced with Pygame 1.8. That should be easier to track down.
> > > >