On Friday 06 June 2008 23:23:48 Hannu Savolainen wrote: > Hi all, > > I have some great problems in figuring out what the latest ossxmix > patches are supposed to do. Could somebody explain the logic?
The total information returned by EXTINFO (i.e. for all controls) forms a tree, but with the unique property that travel is in the opposite direction (leaf to parent). At start a visible_groups array is inited to zero. We iterate var i over the array, and every time an inner loop mark the node i 's parents as non-empty in visible_groups. That way, only the leafs will have zero remaining, and these are either empty groups, or other controls (we don't care what is set in visible_groups for them)**. Later, in the large switch below, skip MIXT_GROUP controls which have visible_groups[ctrl] == 0. ** There are two optimizations: A. Memoize - do not pass over parents marked by previous passes in the inner loop. Since the result visible_groups is an array, we can use it as is. B. When node i is a MIXT_GROUP, skip it in the outer loop. (This is neat, because it prevents empty groups from marking their "parent" as non-empty, and also we don't need memoization for that loop that way). Yours, Yair K. _______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel