Get the number and names of control switches for the mixer
#include <sys/asoundlib.h > int snd_ctl_mixer_switch_list( snd_ctl_t *handle, int dev, snd_switch_list_t *list );
libasound.so
The snd_ctl_mixer_switch_list() function uses the control device handle to fill the given snd_switch_list_t structure with the number of switches for the mixer specified. It also fills in the array of switches pointed to by pswitches to a limit of switches_size. Before calling snd_mixer_groups(), set the members of the snd_switch_list_t as follows:
On a successful return, the snd_ctl_mixer_switch_list() function will fill in these members:
Zero on success, or a negative value if an error occurs.
QNX Neutrino
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
The switch struct must be initialized to a known state before making the call; use memset() to set the struct to zero, and then set the name member to specify which switch to read.
snd_mixer_group_read(), mix_ctl.c application example source code