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

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



Hello,

I've been making a little "snooze alarm" clock on my linux machine
using the pygame.mixer and pygame.mixer.music modules to produce the
sound. I have a few questions:

1. Is it possible to "fade-in" a music piece? This would be nice to
have to gently wake up the user (victim?). I already know that there
is a set_volume which can be used do the same thing, but I would
rather avoid writing loops because it blocks other events from
registering.

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. When I go from
playing one piece to another, how do I set the sample rate? Do I need
to .quit() the mixer and .init() it again?

Thanks,
Srinath