mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
More mixer updates (probably last asound.h changes for group enhancements)...
This commit is contained in:
parent
4dcaf1de94
commit
9f2bbd5677
2 changed files with 18 additions and 0 deletions
|
|
@ -36,6 +36,8 @@ int snd_mixer_read(snd_mixer_t *handle, snd_mixer_callbacks_t * callbacks);
|
|||
void snd_mixer_set_bit(unsigned int *bitmap, int bit, int val);
|
||||
int snd_mixer_get_bit(unsigned int *bitmap, int bit);
|
||||
|
||||
const char *snd_mixer_channel_name(int channel);
|
||||
|
||||
int snd_mixer_element_has_info(snd_mixer_eid_t *eid);
|
||||
int snd_mixer_element_info_build(snd_mixer_t *handle, snd_mixer_element_info_t * info);
|
||||
int snd_mixer_element_info_free(snd_mixer_element_info_t * info);
|
||||
|
|
|
|||
|
|
@ -257,3 +257,19 @@ int snd_mixer_get_bit(unsigned int *bitmap, int bit)
|
|||
{
|
||||
return (bitmap[bit >> 5] & (1 << (bit & 31))) ? 1 : 0;
|
||||
}
|
||||
|
||||
const char *snd_mixer_channel_name(int channel)
|
||||
{
|
||||
static char *array[6] = {
|
||||
"Front-Left",
|
||||
"Front-Right",
|
||||
"Front-Center",
|
||||
"Rear-Left",
|
||||
"Rear-Right",
|
||||
"Woofer"
|
||||
};
|
||||
|
||||
if (channel < 0 || channel > 5)
|
||||
return "?";
|
||||
return array[channel];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue