Skip to content

Commit

Permalink
alsa: don't enumerate virtual devices, just physical hardware.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 15, 2016
1 parent ad1bfea commit cfa95fe
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -714,12 +714,15 @@ ALSA_DetectDevices(void)
char *desc = ALSA_snd_device_name_get_hint(hints[i], "DESC");
char *ioid = ALSA_snd_device_name_get_hint(hints[i], "IOID");

if ((ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0)) {
add_device(SDL_FALSE, name, desc);
}
/* only want physical hardware interfaces */
if (SDL_strncmp(name, "hw:", 3) == 0) {
if ((ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0)) {
add_device(SDL_FALSE, name, desc);
}

if ((ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0)) {
add_device(SDL_TRUE, name, desc);
if ((ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0)) {
add_device(SDL_TRUE, name, desc);
}
}

free(name);
Expand Down

0 comments on commit cfa95fe

Please sign in to comment.