src/audio/alsa/SDL_alsa_audio.c
changeset 10282 9bbe05f2612a
parent 10206 30ca8e64db6a
child 10284 bd207addc5ec
equal deleted inserted replaced
10281:cb13d22b7f09 10282:9bbe05f2612a
   712     for (i = 0; hints[i]; i++) {
   712     for (i = 0; hints[i]; i++) {
   713         char *name = ALSA_snd_device_name_get_hint(hints[i], "NAME");
   713         char *name = ALSA_snd_device_name_get_hint(hints[i], "NAME");
   714         char *desc = ALSA_snd_device_name_get_hint(hints[i], "DESC");
   714         char *desc = ALSA_snd_device_name_get_hint(hints[i], "DESC");
   715         char *ioid = ALSA_snd_device_name_get_hint(hints[i], "IOID");
   715         char *ioid = ALSA_snd_device_name_get_hint(hints[i], "IOID");
   716 
   716 
   717         if ((ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0)) {
   717         /* only want physical hardware interfaces */
   718             add_device(SDL_FALSE, name, desc);
   718         if (SDL_strncmp(name, "hw:", 3) == 0) {
   719         }
   719             if ((ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0)) {
   720 
   720                 add_device(SDL_FALSE, name, desc);
   721         if ((ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0)) {
   721             }
   722             add_device(SDL_TRUE, name, desc);
   722 
       
   723             if ((ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0)) {
       
   724                 add_device(SDL_TRUE, name, desc);
       
   725             }
   723         }
   726         }
   724 
   727 
   725         free(name);
   728         free(name);
   726         free(desc);
   729         free(desc);
   727         free(ioid);
   730         free(ioid);