Re: [LAD] engine, validation, ui separation,

From: Arnold Krille <arnold@email-addr-hidden>
Date: Fri Mar 04 2011 - 13:53:42 EET

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

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Received on Fri Mar 4 16:15:02 2011

This archive was generated by hypermail 2.1.8 : Fri Mar 04 2011 - 16:15:03 EET