On Mon, 3 Feb 2003, David Olofson wrote: > > As a plugin author, having to implement > > both is a pain. I use code generation to make both functions. > > You don't necessarily *have* to implement both. Even the primitive FX > plugin API of Audiality have these variants: > > void (*process)(struct ADY_plugin *p, > int *buf, unsigned frames); > void (*process_r)(struct ADY_plugin *p, > int *in, int *out, unsigned frames); > void (*process_m)(struct ADY_plugin *p, > int *in, int *out, unsigned frames); > > ...and you only *have* to provide *one* - any variant will do. If you > don't provide all of them, the host "SDK" will emulate the others > using the ones that are provided.
I think this is bad. There should be just one process() function, which could be given two gain values, one for previous output and another for the plugin's own output. Plugins would do out[i] = previous_gain * out[i] + gain * myoutput; When previous gain is zero this is almost equivalent to replace except that NANs and maybe some other values will screw you. Solution: forbid NANs as output and maybe cleanse buffers periodically. And initially, of course. -- Sami Perttu "Flower chase the sunshine" [EMAIL PROTECTED] http://www.cs.helsinki.fi/u/perttu
