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
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Feb 6 16:15:03 2012
This archive was generated by hypermail 2.1.8 : Mon Feb 06 2012 - 16:15:03 EET