Performing Current Volume measurement on JACK endpoints

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Performing Current Volume measurement on JACK endpoints

PaulM
Hi,
   I am wondering if there is anyone out there with any ideas to tackle a problem I have. We have a JACK system with say 30+ endpoints running on a private network. The system is running fine across a number of devices.

I know I can create a JACK client, attach it to any endpoint and do peak Volume and RMS calcs. However I would prefer to avoid running clients between some of the connections due to some latency issues. One of the endpoints requires a sample block of 512 ( period 4) when active and I can't afford to run a client due to the latency, 512 * 4/44100 =  46ms which is a bit high for what I need.

I was wondering if there is a JACK API to report any stats on endpoints about peak volume over a defined period. I can't find anything, so doubt it. Does anyone know if this info would be available anywhere and I could try to expose it by modding source ?

Also tried ALSA arecord playing to /dev/null with verbose option to print out the peak volume but it was a stupid idea as JACK has the port open already! Duh !

I am now looking to see if I can use an ALSA api to take a snapshot of the last  2000 odd samples and process later, I only need a peak measurement every 1/2sec. The trouble is I need JACK connected to the port and getting the buffer to process later cannot affect the JACK audio stream. Basically I need JACK to use the audio port , but need a way to take a snapshot of samples every 1/2 sec or so and not affect the audio streaming. I can process the peak meaurement off line.

The apps I have seen so far for VU measurements all use clients. Am I trying to do the impossible here ? Do I need to accept the latency hit and use a client ?

Cheers
Paul McManus