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

Re: [pygame] Poor sound



theGREENzebra wrote:

The sound get slightly distorted and scratchy. I have sound of a gong (44000 16bit Stereo)) that gets spikes, If I play
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.

Try not using pre_init at all. I know it's not going to get you your specific samplingrate and/or bit depth, but see if the scratchies go away. I've experienced this before and that might be how I solved it.

B
The reason I tried the pre_init was because of the spikes and another sound that got badly distorted at least that other sound is ok after pre_init.. My guess is that there is a problem with SDL, because I get the same spikes every time, so its unlikly to be a trouble with interrupts.
While we are talking sound, are there any support for hardware acceleration of sound ?

Bo)