Hi there, You probably need to flush events. Pygame needs to run an event loop, otherwise the event queue gets clogged. See: https://stackoverflow.com/a/13653825/488012
Regards, Pablo El vie., 20 abr. 2018 0:58, Avi Yaar <aviy...@gmail.com> escribió: > Hello, > > Sorry for the potentially silly question, but I have an ~2 second sound > file that I want to play twice with a specific time delay between each time > (time delay is longer than the length of the sound file). > > The sound plays once, but for some reason the second call to .play() is > not producing any sound. > > My script is basically: > > import time > import pygame > > pygame.mixer.init() > sound = pygame.mixer.Sound("my_sound_file.wav") > sound.play() > time.sleep(10) > sound.play() > > I tried looking in the docs at https://www.pygame.org/docs/ref/mixer.html, > but couldn't find anything that addresses this. > > Thanks for your help! > Avi > > >