So I am making a game and the music file I want to play in background isn't opening. The error is below:
Traceback (most recent call last):
File "C:/Users/LENOVO/Desktop/Everything Here!!/sound.py", line 16, in <module>
hitSound = pygame.mixer.Sound('Game//Hit.wav')
pygame.error: Unable to open file 'Game//Hit.wav'
I suppose the error is probably the frequency of these audio files. But I really don't know how to fix that, and I tried using audacity to change the frequency but the music literally died and nothing was to be heard. So, please tell me a way to fix this without making the sound go away. Here is the code for sound functions:
clock = pygame.time.Clock()
bulletSound = pygame.mixer.Sound('Game//Bullet.wav')
hitSound = pygame.mixer.Sound('Game//Hit.wav')
music = pygame.mixer.music.load('Game//BackgroundMusic.wav')
pygame.mixer.music.play(-1)