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

Re: [pygame] questions on pygame.mixer and pygame.mixer.music modules



On Mon, 2005-09-12 at 16:57 -0700, Srinath Avadhanula wrote:
> 1. Is it possible to "fade-in" a music piece? 

You'll probably just want to do this with a ramp of set_volume calls. If
your app is sleeping on the event queue with pygame.event.wait(), you
could start a timer event every second and turn the volume up a little
more each time.


> 2. I have two pieces which need to be played one after another. One
> piece is sampled at 22 KHz and the other at 44.1KHz.

The SDL library does doubling and halving of sample rates. So as long as
all the sound files are multiples of each other, you can play files with
different rates.

It is also possible to call pygame.mixer.quit() and then recall
pygame.mixer.init(frequency). Reinitializing works fine, but you will
need to reload all Sound objects and the music track between inits.