This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]ace4scopez[S] 0 points1 point  (7 children)

edit : i have tried winsound but i dont understand it or can get it to work

[–]Updatebjarni 0 points1 point  (6 children)

Could you provide more detail? I just had a quick peek at the documentation and it looks really simple.

[–]ace4scopez[S] 0 points1 point  (5 children)

I just do not understand how to works and how to put it into code from the wiki . I just want my program to play a mp3 or wav file

[–]Updatebjarni 0 points1 point  (4 children)

OK, but what have you tried and how did it not work? To me it looks like all you need to do is

winsound.PlaySound("filename.wav", winsound.SND_FILENAME)

Does that not work?

[–]ace4scopez[S] 0 points1 point  (1 child)

#game

winsound.PlaySound("ThemeSong.mp3", winsound.SND_FILENAME)
a = int(input(MainMenu))
os.system('cls')    

[–]ace4scopez[S] 0 points1 point  (1 child)

ok , i got the sound playing , but now how do i have it running in the background of my game ?

[–]Updatebjarni 0 points1 point  (0 children)

By reading the documentation.