Commit 62e81df9 by BellCodeEditor

auto save

parent 4fbca426
Showing with 6 additions and 5 deletions
......@@ -20,11 +20,12 @@ volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
c=os.listdir("C:\\Users\\EDZ\\Desktop\\test")
a=[]
for i in range():
if i[-4:]=='.wav' or file[-4:]=='.ogg':
a.append(i)
for i in c:
if i[-4:]==".wav" or i[-4:]==".ogg":
a.append(i)
print(a)
b=-1
while True:
for event in pygame.event.get():
......@@ -64,7 +65,7 @@ while True:
b+=1
if b>len(a)-1:
b=0
pygame.mixer.music.load(a[b])
pygame.mixer.music.load("C:\\Users\\EDZ\\Desktop\\test\\"+a[b])
pygame.mixer.music.play()
print(a[b])
......
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