The attached patch solves the problem, it ensures that the "PeakIndicator" is updated less often and it combines the VU meter with the clipping engine.
By the way:
Can one explain why it is a good idea to clamp the samples to a specific value?
It might be a bad idea to put such a such a ironed waveform to the output. Maybe it is better to leave the waveform untouched and let the hardware decide what to do instead of putting a waveform with an damaging DC part to the output and possibly bypass the hardware’s exception handling for this case.
The attached patch solves the problem, it ensures that the "PeakIndicator" is updated less often and it combines the VU meter with the clipping engine.
By the way:
Can one explain why it is a good idea to clamp the samples to a specific value?
It might be a bad idea to put such a such a ironed waveform to the output. Maybe it is better to leave the waveform untouched and let the hardware decide what to do instead of putting a waveform with an damaging DC part to the output and possibly bypass the hardware’s exception handling for this case.