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

[pygame] proposed change to pygame.mixer.init() and tiny bug fix



Hi,

if I do this :

>> import pygame.mixer
>> pygame.mixer.init( 44100, 16, 2, 2048 ) # buffersize param?

I get a nasty crash on W95/98/2K.

Ok, so "Don't do that!" works, but included is a patch
that fixes this and allows the audio buffer size to be
set (default is 1024).

Setting it to 2048 helps with MP3 playing on my (ancient) ISA 
soundcard (on W95)


Unfortunately, pygame.mixer.get_init() isn't able to return
this extra setting because SDL_Mixer doesn't seem to support
getting it.

As the SDL audio drivers are able to override the requested
buffer size, the actual size in use isn't known in PyGame.

Hmmm, I can see why Pete didn't do this initially!

cheers,
John.

mixer-patch.zip