Commit 567551c8 by BellCodeEditor

save project

parent 8f1b8dce
Showing with 1 additions and 13 deletions
......@@ -57,9 +57,6 @@ while True:
else:
play_button = play_img
pygame.mixer.music.pause()
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1
if num > len(music_list) - 1:
......@@ -71,9 +68,7 @@ while True:
click += 2
else:
click += 1
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
if x > 120 and x < 220 and y > 350 and y < 400: # 上一曲
num -= 1
if num < 0:
......@@ -85,9 +80,6 @@ while True:
click += 2
else:
click += 1
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
if pygame.mixer.music.get_busy() == False:
num += 1
......@@ -96,10 +88,6 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
#歌曲播放进度时间
play_time = pygame.mixer.music.get_pos()
play_time = int(play_time/1000)
......
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