import pygame
pygame.mixer.init()
pygame.mixer.music.load("water.mp3")
pygame.mixer.music.set_volume(0.7)
pygame.mixer.music.play()
while True:
print("Press 'p' to pause, 'r' to resume")
print("Press 'e' to exit the program")
query = input(" ")
if query == 'p':
pygame.mixer.music.pause()
elif query == 'r':
pygame.mixer.music.unpause()
elif query == 'e':
pygame.mixer.music.stop()
break
I wrote this but error showing this
Traceback (most recent call last): File "C:\Python Programming\play_sound.py", line 7, in pygame.mixer.music.load("water.mp3") pygame.error: Failed loading libmpg123-0.dll: The specified module could not be found.