> input = (float)read_from_soundcard() / 32767.0f;
> input = run_plugin(input);
> ...
> write_to_soundcard((short)(input * 32767.0f));
 

... but please make that 32768.0f !

I forget the reasons, but there was a long argument about it either
on music-dsp or vst-plugins. It's a very small difference, but an 
important one if for example you are performing noise shaping on a
float signal just before it is converted to 16 bits, or if you just
want an accurate "over" meter.


Paul.

_____________________________

  m a x i m | digital audio

    http://mda-vst.com
_____________________________


Reply via email to