This project has moved. For the latest updates, please go here.

Get WaveIn Audio Volume

Jan 17, 2011 at 5:58 PM


Does anyone know how to get the volume of the sound being recorded by NAudio, I've tried various snippets on this forum but they aren't working as I would expect (A 0-1 or 0-100 float that represents the volume of the audio).

Any help on this is appreciated,



Jan 18, 2011 at 6:50 PM

have a look at the NAudio demo, which draws a waveform and shows a volume meter

Jan 18, 2011 at 7:35 PM

I've had a look at that document and it works great (i.e. I've been able to grab the volume of a file being played) but how would I port it over to grab the audio of a, say microphone?

Excuse my ignorance but audio is a new field for me and I'm unable to find any documentation.


Jan 18, 2011 at 8:33 PM

for a recording example, have a look at the .NET voice recorder: and see my article on coding4fun:


Jan 18, 2011 at 9:17 PM

That's EXACTLY what I'm after, thanks a lot Mark!

Btw I noticed waveIn.DeviceNumber is missing from the latest version, any alternatives or has it been completely removed?

Thanks again.

Jan 18, 2011 at 10:33 PM

it's still part of WaveIn, just not in IWaveIn, as that interface can be implemented by other technologies that don't have a concept of device number