Bo Jangeborg wrote:
they are the same as the mixer module init arguments, found in the pygame.org docs somewhere.Rene Dudfield wrote:Thanks that solved it :) , is there some documentation on the buffer values somewhere ?Bo Jangeborg wrote:I have scratchy sound on windows XP too. pre_init with the args below fixes the scratchy sounds. But the latency in increased a little too much for some.The sound get slightly distorted and scratchy. I have sound of a gong (44000 16bit Stereo)) that gets spikes, If I playIm currently looking into converting a smal free strategy game to pygame. One thing that I have noted is that the sound output from the mixer is rather poor even if you preinitialize it to correct values. Is this a problem that is being looked into by the SDL group ?
what sort of 'poor' do you mean? latent? scratchy?
while i wouldn't call the SDL sound stuff wide featured, it does run well enough for games with a controlled set of data. it is the same sound engine used in nearly all linux games.
the same sound but using the winsound module it sounds perfect, but then I can only play one sound at a time.
I don't know if this is an issue with NT W2K and XP, but anyway it doesn't sound good. It may work better under Linux but I haven't
got a working Linux desktop right now.
Btw I have used pygame.mixer.pre_init(44100, -16) . How do you know whether to use -16 or 16, not that I can hear any differens.
You can download the gong sound from
http://www.softwave.se/filer/gong.wav
http://www.softwave.se/filer/gong.ogg
pygame.mixer.pre_init(44100,-16,2, 1024 * 3)