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

Re: [pygame] Windows music problems



Gerrit Holl wrote:
when I play a midi file with pygame.mixer.music.load(...), it
plays fine under Linux. On a Windows box, however, the play speed
depends on the speed of the game (number of fps). How do I tell
a Windows box to play the music independant of the number of
frames per second?
how do you mean dependant on the framerate? does the music stop if your game gets too slow? or does the tempo go faster if the framerate goes up?

on windows platforms, SDL_mixer uses the windows native midi playback for midi music. on other platforms it uses timidity. you can build SDL_mixer for windows that uses timidity instead.

the bug must be somewhere in SDL_mixer's handling of the native midi playback. i don't know if it's the sort of thing that pygame is going to be able to work around.

can you determine what part of the faster framerate is making the music change? i am guessing it is some pygame.event queue function, since SDL does a bit of polling and updating when updating the event queue. although i'm surprised anything inside SDL_mixer is getting effected by this?