ALSA project - the C library reference
|
Basic Soundcard Operations. More...
Functions | |
int | snd_card_load (int card) |
Try to load the driver for a card. | |
int | snd_card_next (int *rcard) |
Iterate over physical sound cards. | |
int | snd_card_get_index (const char *string) |
Convert a card string to the card index. | |
int | snd_card_get_name (int card, char **name) |
Obtain the card name. | |
int | snd_card_get_longname (int card, char **name) |
Obtain the card long name. | |
Basic Soundcard Operations.
int snd_card_get_index | ( | const char * | string | ) |
Convert a card string to the card index.
This works only for physical sound cards, not for virtual cards.
string | A string identifying the card. |
The accepted formats for "string" are:
int snd_card_get_longname | ( | int | card, |
char ** | name ) |
Obtain the card long name.
card | Index of the card. |
name | Result - card long name corresponding to card index. |
The value returned in name is allocated with strdup and should be freed when no longer used.
int snd_card_get_name | ( | int | card, |
char ** | name ) |
Obtain the card name.
card | The index of the card. |
name | Result - card name corresponding to card index. |
The value returned in name is allocated with strdup and should be freed when no longer used.
int snd_card_load | ( | int | card | ) |
Try to load the driver for a card.
card | Card index. |
int snd_card_next | ( | int * | rcard | ) |
Iterate over physical sound cards.
This function takes the index of a physical sound card and sets it to the index of the next card. If index is -1, it is set to the index of the first card. After the last card, the index is set to -1.
For example, if you have 2 sound cards (with index 0 and 1), the index will be modified as follows:
This does not work for virtual sound cards.
rcard | Index of current card. The index of the next card is stored here. |