ALSA project - the C library reference
|
Give device name hints. More...
Functions | |
int | snd_device_name_hint (int card, const char *iface, void ***hints) |
Get a set of device name hints. | |
int | snd_device_name_free_hint (void **hints) |
Free a list of device name hints. | |
char * | snd_device_name_get_hint (const void *hint, const char *id) |
Extract a value from a hint. | |
Give device name hints.
int snd_device_name_free_hint | ( | void ** | hints | ) |
Free a list of device name hints.
hints | List to free |
char * snd_device_name_get_hint | ( | const void * | hint, |
const char * | id ) |
Extract a value from a hint.
hint | A pointer to hint |
id | Hint value to extract ("NAME", "DESC", or "IOID", see below) |
List of valid IDs: NAME - name of device DESC - description of device IOID - input / output identification ("Input" or "Output"), NULL means both
The return value should be freed when no longer needed.
int snd_device_name_hint | ( | int | card, |
const char * | iface, | ||
void *** | hints ) |
Get a set of device name hints.
card | Card number or -1 (means all cards) |
iface | Interface identification (like "pcm", "rawmidi", "timer", "seq") |
hints | Result - array of device name hints |
hints will receive a NULL-terminated array of device name hints, which can be passed to snd_device_name_get_hint to extract usable values. When no longer needed, hints should be passed to snd_device_name_free_hint to release resources.
User-defined hints are gathered from namehint.IFACE tree like:
namehint.pcm [
myfile "file:FILE=/tmp/soundwave.raw|Save sound output to /tmp/soundwave.raw"
myplug "plug:front|Do all conversions for front speakers"
]
Note: The device description is separated with '|' char.
Special variables: defaults.namehint.showall specifies if all device definitions are accepted (boolean type).