how to grab audio amplitude from sound card in Linux for programming Linux app?
I am trying to write an audio application for Linux, and was looking for another way to write it instead of using the PulseAudio libs. This is what I want to do: play an audio file from the command line using the "play", "paplay" or "wavplay" or some similar play utility that will play the sound to the sound card speaker output. Then, I want to grab the amplitude of each sound that is played, and store it into a variable. Basically, a sound grabber application for Linux. I was thinking of writing it in the C programming language, but if you know a command line way to do this, that could help to get me started on seeing how it works in Linux.
I know that there are two devices that I can use, /dev/audio and /dev/dsp. Any answers on the capability of Linux with the 126.96.36.199 kernel (or later if capability was added) to solve this problem would be helpful.