1 #include "../include/asoundlib.h" 2 #include <err.h> 3 4 int main(int argc, char *argv[]) 5 { 6 const char *iface = "pcm"; 7 char **hints, **n; 8 int err; 9 10 if (argc > 1) 11 iface = argv[1]; 12 err = snd_device_name_hint(-1, iface, &hints); 13 if (err < 0) 14 errx(1, "snd_device_name_hint error: %s", snd_strerror(err)); 15 n = hints; 16 while (*n != NULL) { 17 printf("%s\n", *n); 18 n++; 19 } 20 snd_device_name_free_hint(hints); 21 return 0; 22 } 23