[LAD] LV2 and parameter interpolation

Gabriel M. Beddingfield gabrbedd at gmail.com
Mon Feb 6 13:23:57 UTC 2012


On 02/06/2012 03:33 AM, Jörn Nettingsmeier wrote:
> can i rely on control port data being available during activate() so
> that i can initialize my current values to the control port values?

No. Ports are only valid during the run() method.

> now i could set the current values to NULL during instantiate and
> deactivate, but then i'd have an extra conditional in run(), which i'd
> like to avoid.

If your engine has different "states," just make this first-run 
condition one of your states and use a switch() statement.

You should be able to do all this initialisation with a single compare 
or switch... which is cheap.  I don't see a way to avoid having it, though.

-gabriel



More information about the Linux-audio-dev mailing list