I just realized that you may not want to clamp if your
output
is a 32 bit float or double, as it is fully capable of handling
the value as produced. For instance, if (well, when) we suck this
algorithm into ardour we don't need to clamp, as our internal
format is float.
true. i'll make it an option.
Correct me if I'm wrong, but isn't clipping only a problem when
converting to integer PCM sound file. If that is the case, you
can leave the data unclipped and let libsndfile do the clipping
by using this: