jp9000/OBS — pull request #7 by bilhamil (2012-12-11 05:58:09+00:00)
Title: Updated Volume Meter

I updated the volume meter: changed to logarithmic scale, added 6dB graduations, adjusted to more frequent updates, and added a level maximum indicator.

Youtube video of it in action (there is loud audio so you may want to turn down the volume before watching....):
http://youtu.be/27CGflIKEhc

I ammended the sse code to compute the correct sum of squares and maximums.

I would do a sanity check on my SSE max code. I am fairly certain that it does the right computation, but I am unsure if it is actually worth doing the sse horizontal maximum instead of just doing a bunch of max(a,b)'s (performance wise).

I looked a lot at that audio meter program that notr1ch linked. What that does is it graphs the current maximum at all times (it slowly diminishes after some delay). What my implementation is doing is showing the RMS or geometric average of the signal to get a average volume level reading. I added a maximum bar to indicate maximum sample levels so that you can see where that is in the meter. Choosing between these two options is a design choice, so I will go with what you guys are comfortable with.