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

[pygame] pygame.mixer.init(frequency=?)



Howdy.

I can't seem to find any clear info on my problem. I'm hoping someone here has dealt with this.

I have two songs. One has a bitrate of 48000, the other 44100. If I allow Pygame (SDL mixer) to use the default frequency, the playback speed of the songs is distorted. If I explicitly set the mixer frequency to match a song so it sounds good, the other sounds distorted.

Reinitializing the mixer is not a good option. There are other sounds that need to play, and would be interrupted by a reinit. Resampling the songs is not ideal, either, as Vorbis is a lossy format and sound quality is obviously lost in re-sampling.

Does anyone have a recommendation? Are all sounds in an implementation expected to have the same bitrate?

Thanks in advance for any insight. :)

Gumm