更新时间:2022-11-03 15:13:25
我假设这是C#......
跳过非托管代码,只需使用 System.Media.SoundPlayer [ ^ ]它将在单独的线程中播放声音,而不会锁定您的应用程序。
I'm assuming that this is C#...
Skip the unmanaged code, just use System.Media.SoundPlayer[^] which will play the sound in a separate thread without "locking up" your application.