ALSA: monitoring output level

From: bad_knee (bl8n8r_at_yahoo.com)
Date: 05/17/04


Date: 17 May 2004 08:38:17 -0700

Hello All. I've built an MP3 player that is using the ALSA system,
and have a couple of questions:

1) Does anyone know of a way to read the stream of data that is
currently being played? (to build one of those cool looking
oscilliscope displays).

Other than hacking the mpg123 source, I'm hoping for a quicker way. (I
have a crystalfontz LCD display embedded as an interface, no monitor
here)

2) The other question is how to read the output level of each song
being played?

I'm thinking of setting a threshold somehow and automatically
adjusting the volume control, on the fly, as the song is being played.
 This required being able to read the volume level of the
datastream.... or something.

thanks!