mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
- rename devname -> pcmdev, it conflicts *BSD <stdlib.h> function - replace <values.h> -> <limits.h> and fix K&R style related warning - use config.h to determine include <malloc.h> - add OpenBSD support and fix printf() warning - fix warning Fixes: https://github.com/alsa-project/alsa-lib/pull/298 Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
23 lines
435 B
C
23 lines
435 B
C
#include "../include/asoundlib.h"
|
|
#include <err.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
const char *iface = "pcm";
|
|
void **hints;
|
|
char **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 = (char **)hints;
|
|
while (*n != NULL) {
|
|
printf("%s\n", *n);
|
|
n++;
|
|
}
|
|
snd_device_name_free_hint(hints);
|
|
return 0;
|
|
}
|