Get the number of routes in the mixer and their IDs
#include <sys/asoundlib.h> int snd_mixer_routes( snd_mixer_t *handle, snd_mixer_routes_t *routes );
- The handle for the mixer device. This must have been created by snd_mixer_open() .
- A pointer to a snd_mixer_routes_t structure that snd_mixer_routes() fills in with information about the routes.
Use the -l asound option to qcc to link against this library.
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.
Before calling snd_mixer_routes(), set the members of this structure as follows:
- 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).
- 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:
- The total number of routes in the mixer.
- The number of routes that couldn't be copied to the storage location.
- The list of routes.
Zero on success, or a negative value on error.
- Invalid handle.