Commit c1764352 by BellCodeEditor

save project

parent c4608067
Showing with 9 additions and 2 deletions
import pygame
from pygame import locals
import os
pygame.init() # 初始化
# 创建窗口
......@@ -13,8 +14,14 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
music_list=["歌曲1.wav","SUN.mp3","YYY.mp3"]
num= -1
#music_list=["歌曲1.wav","SUN.mp3","YYY.mp3"]
num = -1
music_list=[]
path="E:\\test"
filelist= os.listdir(path)
for i in filelist:
if i[-4:] ==".wav" or i[-4:]==".mp3":
music_list.append(i)
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment