[LAD] engine, validation, ui separation,

Arnold Krille arnold at arnoldarts.de
Fri Mar 4 11:53:42 UTC 2011


On Friday 04 March 2011 12:30:13 James Morris wrote:
> Just a quick question, where does validation of parameters belong?
> Invalid params might crash the engine, so some validation should go there.
> 
> But if the job of validation is down to the UI, the engine can be more
> efficient.

The engine doesn't have to do the validation in the realtime-processing 
thread. Just check for the limits where the values enter the engine. This can 
easily done when using functions to set the values and thus hiding the 
internal queues (to get the new values to the realtime-engine without blocking 
either side).

> But if multiple UIs are possible, validation effort is duplicated.

Well, checking the limits once to many doesn't crash the engine. Not checking 
the limits might...

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20110304/1f006d5b/attachment.pgp>


More information about the Linux-audio-dev mailing list