I only want to detect if any sound is playing

Sep 30, 2011 at 4:44 PM

Hi. I found NAudio looking for detect if any sound is playing, I don't need to record anything neither play anything. I know there is a lof of examples, but probably they do a lot of interesting things, and I'm going to get lost. Please can you help me to find a basic example to achieve what I'm looking for?

Thanks and sorry for my english.

Oct 17, 2011 at 9:32 AM

You need to start monitoring the input using the WaveIn class, and then examine the buffers of audio you receive to see if there is a signal higher than a threshold of your chosing.

Oct 17, 2011 at 3:09 PM

Ok thanks, do you know where can I find examples of that?

Oct 17, 2011 at 3:10 PM

No examples of exactly that, but have a look at my .NET voice recorder application to see recording in action. A level meter is shown, which you could use as the basis for your sound detection.

It's at: