Better names for control API

This commit is contained in:
Abramo Bagnara 2001-02-07 15:13:15 +00:00
parent 66f13f6115
commit 45c416ed82
22 changed files with 666 additions and 668 deletions

View file

@ -72,7 +72,7 @@ int snd_card_get_index(const char *string)
{
int card;
snd_ctl_t *handle;
snd_ctl_info_t info;
snd_ctl_card_info_t info;
if (!string || *string == '\0')
return -EINVAL;
@ -90,7 +90,7 @@ int snd_card_get_index(const char *string)
continue;
if (snd_ctl_hw_open(&handle, NULL, card) < 0)
continue;
if (snd_ctl_info(handle, &info) < 0) {
if (snd_ctl_card_info(handle, &info) < 0) {
snd_ctl_close(handle);
continue;
}
@ -104,14 +104,14 @@ int snd_card_get_index(const char *string)
int snd_card_get_name(int card, char **name)
{
snd_ctl_t *handle;
snd_ctl_info_t info;
snd_ctl_card_info_t info;
int err;
if (name == NULL)
return -EINVAL;
if ((err = snd_ctl_hw_open(&handle, NULL, card)) < 0)
return err;
if ((err = snd_ctl_info(handle, &info)) < 0) {
if ((err = snd_ctl_card_info(handle, &info)) < 0) {
snd_ctl_close(handle);
return err;
}
@ -125,14 +125,14 @@ int snd_card_get_name(int card, char **name)
int snd_card_get_longname(int card, char **name)
{
snd_ctl_t *handle;
snd_ctl_info_t info;
snd_ctl_card_info_t info;
int err;
if (name == NULL)
return -EINVAL;
if ((err = snd_ctl_hw_open(&handle, NULL, card)) < 0)
return err;
if ((err = snd_ctl_info(handle, &info)) < 0) {
if ((err = snd_ctl_card_info(handle, &info)) < 0) {
snd_ctl_close(handle);
return err;
}