Commit 779dc69a by BellCodeEditor

save project

parent 81ed09fb
Showing with 9 additions and 2 deletions
......@@ -17,7 +17,7 @@ yinyue = []
c = "C:\\Users\\teem\\Desktop\\vincent\\music\\Hi-Res淘碟宝典及鉴赏天碟"
b = os.listdir(c)
for i in b:
if i[-4:] == ".mp3":
if i[-4:] == ".wav":
yinyue.append(i)
a = -1 #音乐索引
volume = 0.2
......@@ -56,7 +56,14 @@ while True:
else:
play_button = play_img
pygame.mixer.music.pause()
if x > 120 and x < 220 and y > 350 and y < 400:
a -= 1
if a < 0:
a = len(yinyue)-1
pygame.mixer.music.load(c+"\\"+yinyue[a]) # 载入音乐
pygame.mixer.music.play()
play_button = stop_img
click = 2
if pygame.mixer.music.get_busy() == False:
a += 1
if a > len(yinyue)-1:
......
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