0

i have a sound file with a delay in it that plays with pygame.

 menu_sound = pygame.mixer.Sound('sounds/Devastation.ogg')
 #these lines are not next to each other in my code, i just picked out relevant lines.
 menu_sound.play(-1)

there is about a 4 second delay. how can i force pygame to play the music starting at 4 seconds? i have looked at the mixer module documentation and can't find anything.

Python 3.3.3, windows

Thedudxo
  • 549
  • 3
  • 8
  • 22
  • Have you checked your sound file? Perhaps, its not your code, but rather the sound file is delayed itself. Try playing the sound from your computer, not through pygame and see if there is any delay. – Anthony Nov 03 '14 at 15:49
  • @Anthony that is the problem im having. i want to start playing the music after the delay. – Thedudxo Nov 04 '14 at 03:35
  • 1
    Oh gotcha. Try using the [music](http://pygame.bitbucket.org/docs/pygame/ref/music.html#pygame.mixer.music.play) module instead. The play function allows you to start at a certain point in the track. This might not be Ideal, but it should work. – Anthony Nov 04 '14 at 04:26
  • @Anthony yes this has worked. thanks :) – Thedudxo Nov 06 '14 at 06:12

0 Answers0