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

Re: [pygame] pygame.mixer : playing the same file twice



On Wed, 2005-10-12 at 11:57 +0200, MickaÃl Leduque wrote:
> And between two consecutive snd.play(), I sometime have to 
> pygame.mixer.quit(), to use pygame.movie
> And I'm not sure the sound object is robust enough to support that. Does 
> it have some attributes that point to pygame.mixer, that may not be at 
> the same place once pygame.mixer.init() is called again?

You are correct about being on shakey ground for reusing Sound objects
between pygame.mixer init sessions.

It may actually work if pygame.mixer is initialized with the same
values. All the mixing is done in software, so there is not special
hardware buffers to manage for the Sound objects.

I won't endorse it, but if it looks like that works for you it should be
pretty good for everyone.