mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			420 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			420 B
		
	
	
	
		
			C
		
	
	
	
	
	
#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;
 | 
						|
}
 |