Commit 42dac1c8 by BellCodeEditor

auto save

parent 0da85a44
Showing with 3 additions and 7 deletions
...@@ -21,12 +21,8 @@ pygame.mixer.music.set_volume(volume) # 初始播放音量 ...@@ -21,12 +21,8 @@ pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0 click = 0
play_button = stop_img play_button = stop_img
baba=[] baba=['歌曲1.wav','歌曲2.wav','歌曲3.wav','歌曲4.ogg']
path='C:\\Users\\Windows 7\\Desktop\\新建文件夹 (2)'
filelist=os.listdir(path)
for i in filelist:
if i[-4:]=='.wav' or i[-4:]=='.ogg':
baba.append(i)
num=-1 num=-1
...@@ -64,7 +60,7 @@ while True: ...@@ -64,7 +60,7 @@ while True:
num+=1 num+=1
if num>len(baba)-1: if num>len(baba)-1:
num=0 num=0
pygame.mixer.music.load(path+'\\'+baba[num]) pygame.mixer.music.load(baba[])
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
......
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