0
import pygame 
pygame.mixer.init()
pygame.mixer.music.load("Crazy.mp3")
pygame.mixer.music.play()

This simple code worked before but after I updated OS to win11, it doesn't work anymore. It finishes with exit code 0 without playing the music. My pygame version is 2.1.2 and OS is win 11. Another weird thing is that if I type the same codes in the command line, it can work. It just doesn't work neither in VScode nor in pycharm. And the mp3 file is certainly in the same folder as the script.

0 Answers0