mirror of
https://gitee.com/openharmony/third_party_alsa-lib
synced 2024-11-23 07:30:32 +00:00
582d7b6130
Signed-off-by: xuxuehai <xuxuehai2@huawei.com>
24 lines
435 B
C
24 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;
|
|
}
|