[Jesse Chappell] >Erik de Castro Lopo wrote on Thu, 25-Mar-2004: > > > > >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: > > > > http://www.mega-nerd.com/libsndfile/command.html#SFC_SET_CLIPPING > >Beautiful! Erik to the rescue, this is the correct solution. >Throw out my patch and replace with a call to do that.
yes, but ... :) stretch isn't using sndfile for piped I/O which needs clipping too (i wish i could use it but sndfile doesn't like pipes, at least not the versions that compile in ancient build environments like mine). pvoc-0.1.6 (current) adds a new -l (--limit) option that turns on clipping. later versions' man page will recommend its use with int output. tim
