1

im trying to let background music play when opening my application (currently a TKinter window)

I want to do that using winsound (its been the first module ive found)

However, when i start my app, all it does is playing that default windows "brrring" sound.

This is my Code so far

import winsound

bgm = winsound.PlaySound(os.path.expanduser("~\\RunBoyDL\\sounds\\backgroundmusic.wav"), winsound.SND_ASYNC | winsound.SND_FILENAME)
bgmp = os.path.expanduser("~\\RunBoyDL\\sounds\\backgroundmusic.wav")
print (bgm)
print (bgmp)

Ive added the two print methodes for debugging purposes.

BGM returns "None" while BGMP return the (CORRECT) path to the WAV file (when entering the Path into the explorer, it opens the wav file)

The file is 5MB big, nothing special Ive tried to play it from the project directory aswell, without success.

1Day2Die
  • 29
  • 9

0 Answers0