mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Don't show non-existing devices in snd_device_name_hint()
Suppress the non-existing devices in snd_device_name_hint().
This commit is contained in:
parent
e58bd6762f
commit
363b7f8289
1 changed files with 4 additions and 3 deletions
|
|
@ -197,10 +197,11 @@ static char *get_dev_name(struct hint_list *list)
|
|||
free(str1);
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return strdup(list->cardname);
|
||||
}
|
||||
return NULL;
|
||||
/* if the specified device doesn't exist, skip this entry */
|
||||
if (list->device_input >= 0 || list->device_output >= 0)
|
||||
return NULL;
|
||||
return strdup(list->cardname);
|
||||
}
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue