On Mon, Oct 29, 2001 at 11:23:44AM -0500, Paul Davis wrote: > >You still need to clamp output to [SHRT_MIN,SHRT_MAX], otherwise you might > >get overflow. > > if you have to clamp, is it worth it? if input is -1..1.0, how the > output ever overflow?
Well, I was assuming that it was really +-1.0f is 0dB(internal), so >1.0 or <-1.0 is possible, and I though that SHRT_MIN != -SHRT_MAX (though K&R seem to disagree, pp. 257). I guess I've forgotten how 2's complement works. - Steve
