[LAD] Conciderations of Design

Jeff McClintock jef at synthedit.com
Sat Nov 12 20:01:57 UTC 2011


David's advice is right on.

> why not use audio rate control ports? Or some sort of hybrid, allowing
> you to
> switch as needed - but that quickly becomes a complexity explosion...

I use a hybrid where ports are audio-rate AND each port has two states:
'streaming' or 'static'. So if you don't want audio-rate modulation, you
pass a buffer of identical values and set the port state 'static' (not
changing).
 The advantage is: 'Dumb' plugins need no special-case code, just write them
as though the port was always audio-rate, one single simple code-base.
 'Smart' plugins can query the port state and switch to more efficient code
when the port is 'static', e.g. read only the first sample, treat it like a
block-accurate parameter (i.e. Far more efficient).

Best Regards,
Jeff






More information about the Linux-audio-dev mailing list