2006-10-11 13:18:57 +02:00
|
|
|
#include "../include/asoundlib.h"
|
|
|
|
|
#include <err.h>
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
|
|
|
|
const char *iface = "pcm";
|
2023-02-02 16:00:45 +09:00
|
|
|
void **hints;
|
|
|
|
|
char **n;
|
2006-10-11 13:18:57 +02:00
|
|
|
int err;
|
|
|
|
|
|
|
|
|
|
if (argc > 1)
|
|
|
|
|
iface = argv[1];
|
2006-10-27 13:31:32 +02:00
|
|
|
err = snd_device_name_hint(-1, iface, &hints);
|
2006-10-11 13:18:57 +02:00
|
|
|
if (err < 0)
|
|
|
|
|
errx(1, "snd_device_name_hint error: %s", snd_strerror(err));
|
2023-02-02 16:00:45 +09:00
|
|
|
n = (char **)hints;
|
2006-10-11 13:18:57 +02:00
|
|
|
while (*n != NULL) {
|
|
|
|
|
printf("%s\n", *n);
|
|
|
|
|
n++;
|
|
|
|
|
}
|
|
|
|
|
snd_device_name_free_hint(hints);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|