[pulseaudio-discuss] Intercepting PulseAudio sound for EQ display?

Colin Guthrie gmane at colin.guthr.ie
Thu Oct 23 01:56:06 PDT 2008

Knut-Håvard Aksnes wrote:
> Josh Lehan wrote:
>> Hello.  I have a question about intercepting PulseAudio-generated sound.
>> I'd like to make a display for the sound buffer that is currently 
>> playing in realtime, either an oscilloscope or an EQ.
>> Is there an API within PulseAudio to do this?
>> I looked at the monitor sample code for pavumeter, but it seems geared 
>> towards just getting the overall volume level of the current buffer, 
>> and not the actual sample data.
>> I'd love a call to "sniff" the sample data fairly late in the output 
>> process, after it has been mixed from all sources, just before it is 
>> sent to the sound hardware.  Does such a thing exist?
> Sure: Use the monitor interfaces. Each sink has associated with it a 
> monitor source interface where you can listen to the stream being sent. 
> To find it just add .monitor to the name of the source interface. The 
> asynchronous API have calls to do this and lots of other useful tasks.

You can see the calls in pavucontrol, which in recent versions shows a 
per-stream eq level... that code should be ripe for the picking! :)



Colin Guthrie

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]

More information about the pulseaudio-discuss mailing list