I have a Stream of audio data coming from my mic for which I would like to display the current recording volume level. From what I’ve gathered, I need to store X number of bytes in an array and then I can use that data to process that one sample from the recording. How do I determine what X is, and what do I need to do to get the volume level from that data?
I’m working in C# but even pseudo code would be very helpful
WAV files are amplitude-modulated, so each sample value is the relative volume. Average across time and you get an average volume.
Things to watch out for:
Here’s some sample .NET code for reading WAV files:
http://www.codeproject.com/KB/audio-video/WaveEdit.aspx