Blame test/namehint.c

Packit 4a16fb
#include "../include/asoundlib.h"
Packit 4a16fb
#include <err.h>
Packit 4a16fb
Packit 4a16fb
int main(int argc, char *argv[])
Packit 4a16fb
{
Packit 4a16fb
	const char *iface = "pcm";
Packit 4a16fb
	char **hints, **n;
Packit 4a16fb
	int err;
Packit 4a16fb
Packit 4a16fb
	if (argc > 1)
Packit 4a16fb
		iface = argv[1];
Packit 4a16fb
	err = snd_device_name_hint(-1, iface, &hints);
Packit 4a16fb
	if (err < 0)
Packit 4a16fb
		errx(1, "snd_device_name_hint error: %s", snd_strerror(err));
Packit 4a16fb
	n = hints;
Packit 4a16fb
	while (*n != NULL) {
Packit 4a16fb
		printf("%s\n", *n);
Packit 4a16fb
		n++;
Packit 4a16fb
	}
Packit 4a16fb
	snd_device_name_free_hint(hints);
Packit 4a16fb
	return 0;
Packit 4a16fb
}