Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

snd_mixer_groups()

Get the number of groups in the mixer and their group IDs

Synopsis:

#include <sys/asoundlib.h>

int snd_mixer_groups( snd_mixer_t *handle, 
                      snd_mixer_groups_t *groups );

Arguments:

handle
The handle for the mixer device. This must have been created by snd_mixer_open().
groups
A pointer to a snd_mixer_groups_t structure that snd_mixer_groups() fills in with information about the groups.

Library:

libasound.so

Description:

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:

pgroups
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).
groups_size
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:

groups
The total groups in the mixer.
groups_over
The number of groups that couldn't be copied to the storage location.

Returns:

Zero on success, or a negative value on error.

Errors:

-EINVAL
Invalid handle.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

snd_mixer_gid_t, snd_mixer_group_read(), snd_mixer_group_write(), snd_mixer_groups_t, snd_mixer_sort_gid_table()