QNX Developer Support
Get the number of groups in the mixer and their group IDs
#include <sys/asoundlib.h> int snd_mixer_groups( snd_mixer_t *handle, snd_mixer_groups_t *groups );
- The handle for the mixer device. This must have been created by snd_mixer_open().
- A pointer to a snd_mixer_groups_t structure that snd_mixer_groups() fills in with information about the groups.
The snd_mixer_groups() function fills the given snd_mixer_groups_t structure with the number of groups in the mixer that the handle was opened on. It also fills in the array of group IDs pointed to by pgroups to a limit of groups_size.
Before calling snd_mixer_groups(), set the members of the snd_mixer_groups_t as follows:
- This pointer must be NULL or point to a valid storage location for the groups (i.e. an array of snd_mixer_gid_t structures).
- The size of the pgroups storage location in sizeof( snd_mixer_gid_t ) units (i.e. the number of entries in the array).
On a successful return, snd_mixer_groups() fills in these members:
- The total groups in the mixer.
- The number of groups that couldn't be copied to the storage location.
Zero on success, or a negative value on error.
- Invalid handle.