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

Re: [pygame] Windows music problems



Pete Shinners wrote:
> 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?

It goes slower when the game goes slower, it goes faster when the
game goes faster.

> 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.

I'm not going to require that for Windows...

> 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.

Hmm, OK.

> 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?

I will try to get more details this weekend.

yours,
Gerrit.

-- 
121. If any one store corn in another man's house he shall pay him
storage at the rate of one gur for every five ka of corn per year.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/