Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
WaveProvider为什么在我调用Stop on之后又提取了一个数据块DirectSoundOut?即使在暂停之后也会发生。
WaveProvider
DirectSoundOut
我正在使用 NAudio 1.5。
这只是一种人工制品的方式DirectSoundOut已被写入。它是开源的,因此您可以在此处查看代码。您可以通过PlaybackState == PlaybackState.Stopped在调用WaitHandle.WaitAnyin之后检查 for 来阻止这种情况PlaybackThreadFunc。
PlaybackState == PlaybackState.Stopped
WaitHandle.WaitAny
PlaybackThreadFunc