Commit f633f270 by BellCodeEditor

save project

parent 90e97a98
Showing with 7 additions and 3 deletions
...@@ -14,7 +14,13 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -14,7 +14,13 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo logo_img = pygame.image.load('logo.png') # 中间logo
#pygame.mixer.music.load('歌曲3.wav') #pygame.mixer.music.load('歌曲3.wav')
#music = ['歌曲1.wav', '歌曲2.wav','歌曲3.wav','歌曲4.ogg'] #music = ['歌曲1.wav', '歌曲2.wav','歌曲3.wav','歌曲4.ogg']
music = ['歌曲1.wav', '歌曲2.wav','歌曲3.wav','歌曲4.ogg'] music = []
path ="C:\Users\admin\Music\my music"
filelist = os.listdir(path)
for i in filelist:
if i[-4:] == '.ogg' or i[-4:] == '.wav' :
ok = -1 ok = -1
volume = 0.3 volume = 0.3
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
...@@ -60,4 +66,3 @@ while True: ...@@ -60,4 +66,3 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
"C:\Users\admin\Music\my music"
\ No newline at end of file
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