naudio / NAudio

Audio and MIDI library for .NET
MIT License
5.5k stars 1.1k forks source link

WaveOut.Play() Object reference not set to an instance of an object #1109

Open ananadult opened 8 months ago

ananadult commented 8 months ago

Hi, I'm using WaveOut Play() encountered an Object reference not set to an instance of an object I am well aware that when calling play, waveOut has already been initialized, and this phenomenon only occurs on a very small number of computers. waveOut = new WaveOut() { DesiredLatency = 100 };
if (waveOut != null) { Comm.Log.LoggerHelper._.Info($"play and pause ,state:{state}"); if (state) waveOut.Play(); else waveOut.Pause(); } May I ask what is causing this situation? Thank you very much!