Re: CVS commit - 0.95.07
Steve Harris <[email protected]>
| Newsgroups | gmane.comp.audio.jamin.devel |
|---|---|
| Message-ID | <[email protected]> |
On 4 May 2007, at 18:47, Jan Depner wrote:
> On Fri, 2007-05-04 at 12:24 -0500, Jan Depner wrote:
>> OK, I've got the meters set up for RMS on output and I've got the
>> function calls set up in intrim.c to handle it. If someone can
>> figure
>> out how to compute RMS using Steve's routines -
>> http://www.ecs.soton.ac.uk/~swh/rms/ we can get this thing
>> working. I
>> am assuming that the calls would need to go in the following loop in
>> process.c :
>>
>> for (pos = 0; pos < nframes; pos++) {
>> for (port = 0; port < nchannels; port++) {
>> const float oa = fabs(out[port][pos]);
>>
>> if (oa > lim_peak[LIM_PEAK_OUT]) {
>> lim_peak[LIM_PEAK_OUT] = oa;
>> }
>> if (oa > out_peak[port]) {
>> out_peak[port] = oa;
>> }
>> }
>> }
>>
>> but I'm probably wrong ;-)
>>
>
> Just for fun I implemented the "naive" RMS in the above loop
> and it
> looks purty (as we say down here in the South). It's probably not
> what
> we're looking for but it does prove that I've got the meters and
> callbacks set up properly ;-)
Great!
To hook up the code, you just need to initialise the RMS object with
a call to rms_new(), then call rms_run_buffer() on each audio buffer,
and the float that you get back is the RMS signal level.
- Steve
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/