好的,所以我在音乐播放器上工作,但它不能像我想的那样工作,所以问题是当我使用播放声音库播放音乐时,它会阻止代码的运行并冻结tkinter窗口,但是我搜索并发现可以设置为False,但是当它设置为false时,音乐就不会播放了。
以下是代码:
from playsound import playsound as psound
#a loop here where i get the directory of musics and create a button for every music and each of the button's command value is set to the 'play_sound' function and passing the music directory as argument
def play_aux(self, dir):
psound(dir, False)发布于 2022-06-17 09:46:50
好的,我让它工作,但要如何检查声音是否还在播放,所以我切换到游戏,它的工作对我来说很好!
https://stackoverflow.com/questions/72650332
复制相似问题