Updated: October 28, 2024 |
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 );
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:
The number of switches retrieved into the pswitch local storage. Read only.
The number of switches that could not be retrieved due to the size constraints of the pswitches local storage. Read only.
Zero on success, or a negative value if an error occurs.
QNX Neutrino
Safety: | |
---|---|
Cancellation point | 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.