发布网友 发布时间:2022-04-23 04:07
共2个回答
热心网友 时间:2022-04-07 13:35
import _thread
import time
from playsound import playsound
def time1(delay):
time.sleep(1)
playsound("bgm.mp3")
def time2(delay):
time.sleep(2)
playsound("auido.mp3")
try:
_thread.start_new_thread(time1, (1,))
_thread.start_new_thread(time2, (1,))
except:
print("Program Error")
while 1:
pass
热心网友 时间:2022-04-07 14:53
pygame有两个音乐模板,music和sound,这两个一起用就可以同时播放