Dne 01. 05. 20 v 15:44 Yang, Libin napsal(a):
Hi Jaroslav,
EnableSequence [ cmd1 arg1 cms2 arg2 ]
is expanded to:
EnableSequence { 0 cmd1 1 arg1 2 cmd2 3 arg2 }
or
EnableSequence.0 cmd1 EnableSequence.1 arg1 EnableSequence.2 cmd2 EnableSequence.3 arg2
So if you like to add a new sequence which is outside the declared array, then you need to add this:
EnableSequence { cmdid3 cmd3 argid3 arg3 }
or (maybe more readable):
EnableSequence { cmdid3=cmd3 argid3=arg3 }
or:
EnableSequence.cmdid3 cmd3 EnableSequence.argid3 arg3
The ids names can be anything but they must be unique in the block (tree leaf).
The declaration order matters in this context (_arg_ must be right behind _cmd_ for the sequences). Note that the functions which works on top of the configuration tree (like the in-place evaluation - If blocks) are executed on top of this tree (which is parsed at first)! Keep it in the mind.
Yes, it works with your new suggestion now.
Do you think this patch is necessary or not? With this patch we can use the style of: EnableSequence [ cmd1 arg1 cms2 arg2 ]
The patch changes the consistency in the id values for the array representation in memory (so you cannot address them). I tried to move this change to the right place (UCM conditions):
https://github.com/perexg/alsa-lib/commits/array-merge
Could you check this tree? The last commit implements the merge operation for the block from the condition tree to the parent tree. Also the "before" and "after" hints should be accepted, too.
Jaroslav