I have written an application that uses nAudio to play wav files when 'events' happen, and records audio from the microphone.
I am occasionally getting a System.NullReferenceException from NAudio.Wave.WaveOutEvent.PlaybackThread()
I am using nAudio 1.5.4.
Any thoughts on what causes it, and how I can resolve it?
Comments: I am not disposing the player, but I am stopping playback using Stop() on WaveOutEvent. The application plays wav files in response to events occuring - and if a 'higher priority' event occurs, the current playback is stopped, and the new wav file is played instead. It all happens very quickly, so I expect that the issue is related to load/speed.
I am occasionally getting a System.NullReferenceException from NAudio.Wave.WaveOutEvent.PlaybackThread()
I am using nAudio 1.5.4.
Any thoughts on what causes it, and how I can resolve it?
Comments: I am not disposing the player, but I am stopping playback using Stop() on WaveOutEvent. The application plays wav files in response to events occuring - and if a 'higher priority' event occurs, the current playback is stopped, and the new wav file is played instead. It all happens very quickly, so I expect that the issue is related to load/speed.