/usr/share/doc/libasound2-dev/examples/namehint.c is in libasound2-dev 1.1.3-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include "../include/asoundlib.h"
#include <err.h>
int main(int argc, char *argv[])
{
const char *iface = "pcm";
char **hints, **n;
int err;
if (argc > 1)
iface = argv[1];
err = snd_device_name_hint(-1, iface, &hints);
if (err < 0)
errx(1, "snd_device_name_hint error: %s", snd_strerror(err));
n = hints;
while (*n != NULL) {
printf("%s\n", *n);
n++;
}
snd_device_name_free_hint(hints);
return 0;
}
|