Paul Davis wrote:
> 
> i'm looking at the control API, and i can't see how to define a
> control that requires 2 values in order to read or write the control.
> 
> there seems to be an assumption that a control element maps 1:1 onto a
> hardware entity. i want (need) to create a control element that is
> more flexible than that. the basic idea is:
> 
>          control->value.integer.value[0] = source;
>          control->value.integer.value[1] = destination;
> 
>          snd_ctl_read (...)
> 
> or:
> 
>          control->value.integer.value[0] = source;
>          control->value.integer.value[1] = destination;
>          control->value.integer.value[3] = gain;
> 
>          snd_ctl_write (...)
> 
> am i missing something really simple?
> 

I suggest you to use the field index of struct sndrv_ctl_elem_id (one
byte per dimension).

id.index = (source << 8) | destination;


-- 
Abramo Bagnara                       mailto:[EMAIL PROTECTED]

Opera Unica                          Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy

ALSA project               http://www.alsa-project.org
It sounds good!

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to