0

I'm trying to add to my game background music with sound effects and I understood that the best way to do it is with channels and sounds, so I tried it but when I play a sound sound_name.play() or play it with a channel channel_name.play(sound_name) it does nothing, and when I add a delay it beeps.

Does anyone know how to figure it out or has a better way to play some sound on my game (when one sound doesn't stop or reset the other sound)?

Thank you :)

Tomer
  • 11
  • 3
  • Can you share the code that you currently have for playing sounds? – Iain Shelvington Jan 11 '20 at 15:31
  • actually I don't have a code for this yet because I didn't mess with it until now... I do have the next code for play music but it doesn't help me anymore `pygame.mixer.music.load(HELICOPTER_SOUND) pygame.mixer.music.play()` – Tomer Jan 11 '20 at 15:49
  • You can reserve a channel specifically for playing music, then that channel would not be used whenever you play a sound. It's would probably be easier if you provided some sort of example code – Iain Shelvington Jan 11 '20 at 15:55
  • Yes but when I play mp3 file by the Sound it's just beep and doesn't play the file – Tomer Jan 11 '20 at 16:04
  • mp3 support is apparently limited in pygame, can you try a .wav file and see if that works? – Iain Shelvington Jan 11 '20 at 16:08

0 Answers0