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

[pygame] [Pygame] Fading Between Two Songs



Hello,

I need some help with using Pygame's music module. Specifically, is
there a way to fade between two songs?

Suppose I have a song playing called via:

pygame.mixer.music.load('song1.ogg')
pygame.mixer.music.play(-1)

I tried to use Pygame's Music Module's fadeout, but that didn't work:

[Song is already playing]

pygame.mixer.music.fadeout(1000)
pygame.mixer.music.load('song2.ogg')
pygame.mixer.music.play(-1)

The music fadeout function seems to block out all input during that
time (Despite comments to the contrary in the documentation). I'd like
to transition smoothly between those songs without blocking the user's
input. Is there a good way to do this?

Thanks in advance.
-Fawkes