[oss-devel] ossxmix patch to ignore empty mixer group
Hannu Savolainen
hannu at opensound.com
Sat Jun 7 00:12:47 EEST 2008
Yair K. kirjoitti:
> 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.
>
The update_counter feature does the same so the visible_groups array can
be removed. So MIXT_GROUP controls can be skipped if their
update_counter==0.
Best regards,
Hannu
More information about the oss-devel
mailing list