If anyone's interested, my initial efforts at a proof-of-concept realtime volume adjuster have been moderately successful, and very promising. It's pretty easy to compensate for quiet passages, but you need some buffer to stop ugly clicks when the music suddenly gets loud. At the moment, I'm not doing any buffering at all, so basically no memory is required. My next step will be to try it with a very small buffer (probably the audio write size on the empeg) of read-ahead and see if I can eliminate the clicks completely. I don't see any reason why there should be a problem.

This is not really a compressor. It makes only slow adjustments to the volume (except where a sample would cause clipping at the current volume) at a rate of about 3db per second.

I'll let you know about the results of my next experiment.

Richard