This is the code
pygame.mixer.init() pygame.mixer.music.load("sounds/music.mp3") pygame.mixer.music.play(-1) blip = pygame.mixer.Sound("sounds/blip.wav") ball = pygame.mixer.Sound("sounds/ball.ogg")
when you want to make the sound to play:
blip.play()
The code
https://github.com/techwithtim/Golf-Game
The author tutorial
Subscribe to the newsletter for updates
Tkinter templates
My youtube channel
Twitter: @pythonprogrammi - python_pygame