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

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



nice one :)

Since this is a fairly recent change, I don't think it will fix
everyones crackling sound problems... since that problem was around
way before that change was made.

Or does it fix it for everyone now after all?



On Thu, Apr 24, 2008 at 1:51 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Apr 23, 2008 at 7:24 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
>
> > ==== 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);
> >     }
> >
>
> wow... the way I read the broken code, it means that pygame 1.8 is always
> using 256 for the chunksize argument to Mix_OpenAudio (would be setting
> chunk to 256 when i=0) meaning it always played from a 256 byte buffer...
> it's pretty impressive that neither the waveout backend nor many computers
> have a problem with such a small number...
>
> Also, the fixed code means the default chunksize of 3072 is actually 4096.
>