[RoarAudio] New support for LTM (Long Term Monitoring)

Philipp Schafft lion at lion.leolix.org
Sun Aug 29 03:01:32 CEST 2010


flum,

with version 0.4beta0 (currently trunk) we will start to ship a feature
called LTM (for 'Long Term Monitoring').

Basicly this is to ask the server to monitor some streams for you so you
can ask for those information later without needed to read all the data
yourself.

For example you can read the RMS value of a stream so you can implement
a VUMeter. (RMS is the only thing supported by roard at the moment, we
will add more later, maybe this release, maybe next release...)

This has 3 major advantages:
     1. You do not need to read all the data of a stream (THRU) so you
        save significantly bandwidth (for exampel 10 raw pcm streams at
        44.1/16/2 need about 20Mbit/s on the wire!)
     2. You do not need to consume streams, streams are a limited
        resource (not too limited, but if you monitor all streams you
        half that limit...)
     3. if the streams are non-pcm it may not be possible to decode it
        at your end because of missing headers or something. In case it
        is possible (for example using prethru support) you need to
        decode them twice (roard+your app). Also this requires decoder
        in your app which make things more complex.

How does it work?

First you register that you want to use LTM on some streams.
After you registered the streams to LTM you can read LTM values from
your streams at any time.
If you are done you must unregister the streams again. if you do not do
this step the server will still consume CPU and RAM for LTM of those
streams.

I attach a example code which displays the RMS in dB of up to 8 streams.
This example does not do all error handling and stuff. so just take it
as example to get the basic idea.

$ cc -Wall -Wextra -g -O2 -o ltm-vumeter ltm-vumeter.c -lroar -lm
$ ./ltm-vumeter 0
$ ./ltm-vumeter STREAM_IDS

It was tested at update rates of 10Hz, 20Hz, 60Hz.

For VUMeter and such applications I suggest update rates from 5Hz up to
20Hz. If your VUMeter does not look smooth at 10..20Hz your
implementation may be broken.

If you monitor a lot streams you should consider to not update them all
at once. reading LTM data still needs some traffic. Consider to update
them in groups of 5 or something.

(there is still a limit in roard so you can not update many streams at a
time at the moment, this will be fixed befor 0.4beta0)

-- 
Philipp.
 (Rah of PH2)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltm-vumeter.c
Type: text/x-csrc
Size: 1823 bytes
Desc: not available
URL: <http://lists.keep-cool.org/pipermail/roaraudio/attachments/20100829/6393f8c3/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.keep-cool.org/pipermail/roaraudio/attachments/20100829/6393f8c3/attachment.pgp>


More information about the RoarAudio mailing list