更新时间:2023-12-04 08:45:58
According to the documentation you use the SND_ASYNC flag.
winsound.SND_ASYNC
Return immediately, allowing sounds to play asynchronously.
要停止播放,请使用NONE
参数调用PlaySound
.
To stop playing, call PlaySound
with a NONE
argument.
winsound.PlaySound(None, winsound.SND_ASYNC)