The FFmpeg / libavfilter compand filter has a delay parameter that shifts the audio back in time while doing the gain adjustments immediately. This generally reduces the clipping on sudden pops but is not a panacea. To make it compatible with lv2:hardRTCapable, delay would need to have a hard maximum and a buffer large enough for samplerate × max delay × num channels floats would need to be allocated in instantiate(). But also, there has to be some way for the varying latency to be reported back up to the application layer so that A/V sync can be maintained. I have no idea how to do that.
The FFmpeg / libavfilter compand filter has a delay parameter that shifts the audio back in time while doing the gain adjustments immediately. This generally reduces the clipping on sudden pops but is not a panacea. To make it compatible with lv2:hardRTCapable, delay would need to have a hard maximum and a buffer large enough for samplerate × max delay × num channels floats would need to be allocated in instantiate(). But also, there has to be some way for the varying latency to be reported back up to the application layer so that A/V sync can be maintained. I have no idea how to do that.