ao_alsa: list bidirectional devices too

The ALSA doxygen says:

    IOID - input / output identification ("Input" or "Output"), NULL
    means both

This bug was blatantly introduced with commit cf94fce4.
This commit is contained in:
wm4 2015-11-24 19:21:41 +01:00
parent 00b7fb3023
commit ef918b239e
1 changed files with 1 additions and 1 deletions

View File

@ -987,7 +987,7 @@ static void list_devs(struct ao *ao, struct ao_device_list *list)
char *name = snd_device_name_get_hint(hints[n], "NAME");
char *desc = snd_device_name_get_hint(hints[n], "DESC");
char *io = snd_device_name_get_hint(hints[n], "IOID");
if (io && strcmp(io, "Output") == 0) {
if (!io || strcmp(io, "Output") == 0) {
char desc2[1024];
snprintf(desc2, sizeof(desc2), "%s", desc ? desc : "");
for (int i = 0; desc2[i]; i++) {