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:
Takashi Iwai 2008-03-07 17:01:56 +01:00
parent e58bd6762f
commit 363b7f8289

View file

@ -197,10 +197,11 @@ static char *get_dev_name(struct hint_list *list)
free(str1); free(str1);
return res; 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 #ifndef DOC_HIDDEN