Skip to content
← Back to Community
Sounds not working in pygame
Profile icon
mowen88

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!

Voters
Profile icon
ribenrenda
Profile icon
mowen88
Comments
hotnewtop
Profile icon
jordaneasthere

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

channela = sounda.play ()
while channela.get_busy (

https://besthybridtablesaw.com/best-table-saw-for-beginners/

Profile icon
mowen88

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.

Profile icon
DarrellFranklin

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

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

https://writemyessaysonline.com

Profile icon
Johnmash2
Profile icon
Johnmash2