Ask coding questions

← Back to all posts
Sounds not working in pygame
mowen88 (0)

Hi all. I have coded a platformer from an online tutorial and I cannot for the lofe of me get sounds to work. They are coded properly, there was no resolution that worked for me from asking on stackoverflow and the code runs fine, just no sound whether I use music or sound with pygame mixer. The sound works when I use python and import audio function on replit, just nothing on pygame. Thanks for your helps in advance!

mowen88 (0)

Thanks Darrell. I don't get what you mean by still sounding? It just doesn't make a noise and shows no errors, syntax looks correct in code. I have used .play() etc.

DarrellFranklin (0) () returns the object needed to play the sound. You can also use it to find out if the sound is still sounding:

channela = ()
while channela.get_busy ():
pygame.time.delay (100)