How can I play more than one song at a time in PyGame?

前端 未结 2 2114
花落未央
花落未央 2021-01-03 00:05

I\'ve got it working now but with the time delay is there a better way because I want two different scripts to be working I want to have these playing in this order and have

2条回答
  •  我在风中等你
    2021-01-03 00:25

    The following script will load 4 sounds (sound_0.wav to sound_3.wav) and play them.

    sounds = []
    for i in range(4):
        sound = pygame.mixer.Sound('sound_%d.wav'%i)
        sound.play()
        sounds.append(sound)
    

提交回复
热议问题