Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: NAudio in a non GUI thread

$
0
0

In NAudio Demo (x64), using AudioPlaybackPanel with the Ouptut driver set to 'WaveOut' and the callback Mechanism set to 'Event' playback does work. WaveOutEvent is used but it is defined within the scope of AudioPlaybackPanel. My initial thought was that Playback was happening on the GUI thread. On closer examination I realised that playback is indeed happening in it own thread. Removing the USB audio device during playback did result in a stop event in which e.Message was not null. So all is well with the demo.

 

Removing the USB audio device during playback does not in all cases result in a stop event. My program is capable of recording and playback independently and both can happen at the same time. When the USB audio device is removed the playback stop event never fires (probably because WaveIn bombs first and no further clean-up is scheduled).

 

I guess if either the recording or playback bombs that both are no longer functional. 


Viewing all articles
Browse latest Browse all 5831

Trending Articles