KJBob (and SteveL) - Thank you for this block! For peak metering this does a much nicer job than the k/s delay found in the default blocks for the ADAU1452.
Now I'm also trying to implement some average metering. I am using the Envelope RMS block, which has a decay built in (again, k/s). It works, but the k/s decay methodology (when set at its maximum) causes the average meter to decay at a very slow rate from higher amplitudes, which is not intuitive--just like in the peak meter.
I thought that if I could just find a way to gather RMS data without the decay, I could use a mechanism like your Exponential Peak Decay to get a more reasonable decay rate (or even no decay rate). In the SigmaStudio help file, there is a block called "RMS (no: gain, hold, decay)" which would be perfect, but the block is apparently not implemented on the ADAU1452. I looked at using a running average and calculating RMS in separate blocks, but the Running Average block has the decay built in again.
Is anyone aware of a way to calculate a 300ms RMS or running average WITHOUT the built in decay on the 1452?
Thanks!