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

snd_mixer_routes()

Get the number of routes in the mixer and their IDs

Synopsis:

#include <sys/asoundlib.h>

int snd_mixer_routes( snd_mixer_t *handle, 
                      snd_mixer_routes_t *routes );

Arguments:

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

Library:

libasound.so

Description:

The snd_mixer_routes() function fills the given snd_mixer_routes_t structure with the number of routes in the mixer that the handle was opened on. It also fills in the array of route IDs pointed to by proutes to a limit of routes_size.


Note: We recommend that you work with mixer groups instead of manipulating the elements directly.

Before calling snd_mixer_routes(), set the members of this structure as follows:

proutes
This pointer must be NULL, or point to a valid storage location for the routes (i.e. an array of snd_mixer_eid_t structures).
routes_size
The size of this storage location in sizeof( snd_mixer_eid_t ) units (i.e. the number of entries in the proutes array).

On a successful return, the function sets these members:

routes
The total number of routes in the mixer.
routes_over
The number of routes that couldn't be copied to the storage location.
proutes
The list of routes.

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_eid_t, snd_mixer_elements(), snd_mixer_groups(), snd_mixer_routes_t