Commit 3b904ece by BellCodeEditor

auto save

parent 25be37c9
Showing with 6 additions and 2 deletions
import pygame
from pygame import locals
import os
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
......@@ -13,7 +13,11 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
list=os.listdir(r'C:\Users\LEGO 007\Desktop\新建文件夹')
list1=os.listdir(r'C:\Users\LEGO 007\Desktop\新建文件夹(3)')
list=[]
for i in list1:
if i[-4:]== '.wav' or i[-4:]== '.ogg':
list.append(i)
num=-1
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
......
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