This project has moved and is read-only. For the latest updates, please go here.

start new thread for playback/recording ?

Dec 4, 2011 at 11:09 AM


when using NAudio in a WPF Apllication, for which host apis does it make sense to start each new playback in a new thread  (Create the IWavePlayer, call Init(), and Play() ) ?

I could see WASAPI already starts in a new thread, but whats with WaveOut, DirectSound and ASIO ? And for recording with WaveIn ?



Dec 5, 2011 at 1:50 PM

For DirectSound we create a thread. ASIO callbacks come from a thread controlled by the soundcard driver. WaveOut has several callback models. Window uses the GUI thread to handle callbacks, WaveOutEvent creates its own thread, and Function callbacks come on threads created by the driver.