See Pygame Docs, It says:
Channel.queue - queue a Sound object to follow the current
So, even though your tracks are playing on different channels, so if you force each sound to play, they will play simultaneously.
And for playing multiple sounds:
- Open all sound files, and add the
mixer.Sound
object to a list.
- The loop through the list, and start all the sounds.. using
sound.play
This forces all the sounds to play simultaneously.
Also, make sure that you have enough empty channels to play all sounds, or else, some or the other sound sound will be interrupted.
So in code:
sound_files = [...] # your files
sounds = [pygame.mixer.Sound(f) for f in sound_files]
for s in sounds:
s.play()
You could also create a new Channel
or use find_channel()
for each sound..
sound_files = [...] # your files
sounds = [pygame.mixer.Sound(f) for f in sound_files]
for s in sounds:
pygame.mixer.find_channel().play(s)