On Thursday 06 February 2003 16.28, Steve Harris
wrote:
[...]
#define FLUSH_TO_ZERO(fv) (((*(unsigned
int*)&(fv))&0x7f800000)==0)?0.0f:(fv) I think it came from the
music-dsp list.
There's a conditional in there, though.
Another method is to add noise or some other signal (beep at Nyqvist)
with an amplitude a few hundred dB or more below the 0 dB level of
audio data.
Which is fine, unless you have a LP filter in your chain.
Maybe a -200dB sine at 1Hz and Nyquist? But then a BP filter screws you.
Someone once suggested a slight DC offset, though I can't see how that would
solve things like a reverb, unless they preserve it and shift their 0.