Haven't had a lot of time to work on this project recently, but tonight I made some excellent headway. I've got basic limiting working very well, meaning that:
a) An audio burst above the threshold doesn't get through to output audio at all, zip, nada; I'm very happy with that.
b) The averaging takes a few samples - just like the analog version - but unlike the analog version I can shift the application of the gain modification back a couple of samples and apply the new gain before the peak comes through - nice. Additionally, I have the averaging window cut tight, and I have an LED output indicating the clamping condition, so it's possible to adjust the threshold to the point that the light flashes with the incoming code - a nice effect.
c) Working with real radio signals, not bench-generated signals, there's a lot of noise at frequencies higher than the side tone, and that affects overall volume too, so while I was going to use an FFT to clean up the side tone for level measurement, I'm not sure that it isn't better to use the entire audio signal bandwidth. In fact, I think I'll experiment with a peak detector as an alternative to the averaging code, so that spikey noise doesn't get past the averaging function. The FFT will still be useful for character identification f
d) Not surprisingly, I couldn't get the code to run fast enough on the Atmel 8 bit devices, so I'm developing on an Arm. At the moment I'm using an Arduino Due because it's robust, but I'll switch over to a Teensy for the real product.
Sunday I'll code up the encoder interfaces.