So I am working on a board game and I want to play background music.
I import the mixer library from pygame like so:
from pygame import mixer
I then initiate the mixer:
mixer.init()
Then I load my music file and play it:
mixer.music.load('bgmus.ogg')
mixer.music.set_volume('0.5')
mixer.music.play()
When I run my game, I get this error:
Traceback (most recent call last):
File "boardgame.py", line 15, in module
mixer.init()
pygame.error: No such audio device
I'm on Windows, using codio.com as my compiler and was wondering why this error is occurring.