Commit 4aa8df4d by BellCodeEditor

save project

parent 650efdc7
Showing with 6 additions and 5 deletions
import pygame
from pygame import locals
import os
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
......@@ -14,12 +14,13 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
#pygame.mixer.music.load('歌曲1.wav') # 载入音乐
music_list=['test.wav','歌曲1.wav','歌曲2.wav','歌曲3.wav']
music_list=[]
path = 'C:\\Users\\5\\Desktop\\text'
filelist = ['歌曲1.wav','歌曲2.wav','stop_ing']
filelist = os.listdir(path)
print(filelist)
for file in filelist:
if file[-4:] == '.wav':
print(file)
if file[-4:] == '.wav' or file[-4:]=='.ogg':
music_list.append(file)
nam = -1
volume = 0.2
......
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