Hi everyone
I am trying to create something similar to space invaders. In my game, the player launches bullets that bounce, and each time they bounce I want a sound to play.
I load all the sounds (wav format) using pyglet.media.load(path, streaming = False) before I call pyglet.app.run(), and when the game is running I play the sound using
resource.play()
The thing is that when the first bullet bounces, the game freezes for a good 1-2 seconds (no sound also) and then the sound is played and the game continues. After that, the sounds just work perfect.
I have tried to find a solution, but I can't find anything that relates with what I am trying to solve (or at least I can't see how it's related). Hope you can find me, I am sure it's a mistake I am making or something that I don't fully understand.
Thanks
Jose