📜  Pygame 添加配乐音乐 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:16.226000             🧑  作者: Mango

代码示例1
import pygame
file = 'some.mp3'
pygame.init()
pygame.mixer.init()
pygame.mixer.music.load(file)
pygame.mixer.music.play(-1) # If the loops is -1 then the music will repeat indefinitely.