mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Mixer v2.0 merged to the main CVS tree...
This commit is contained in:
parent
3f541735e3
commit
a5b307a711
10 changed files with 536 additions and 167 deletions
|
|
@ -28,11 +28,9 @@ void main(void)
|
|||
}
|
||||
printf("Soundcard #%i:\n", idx + 1);
|
||||
printf(" type - %i\n", info.type);
|
||||
printf(" gcaps - 0x%x\n", info.gcaps);
|
||||
printf(" lcaps - 0x%x\n", info.lcaps);
|
||||
printf(" pcm devs - 0x%x\n", info.pcmdevs);
|
||||
printf(" mixer devs - 0x%x\n", info.mixerdevs);
|
||||
printf(" midi devs - 0x%x\n", info.mididevs);
|
||||
printf(" pcm devs - %i\n", info.pcmdevs);
|
||||
printf(" mixer devs - %i\n", info.mixerdevs);
|
||||
printf(" midi devs - %i\n", info.mididevs);
|
||||
memset(str, 0, sizeof(str));
|
||||
strncpy(str, info.id, sizeof(info.id));
|
||||
printf(" id - '%s'\n", str);
|
||||
|
|
@ -57,8 +55,10 @@ void main(void)
|
|||
continue;
|
||||
}
|
||||
printf(" type - %i\n", mixerinfo.type);
|
||||
printf(" channels - %i\n", mixerinfo.channels);
|
||||
printf(" caps - 0x%x\n", mixerinfo.caps);
|
||||
printf(" elements - %i\n", mixerinfo.elements);
|
||||
printf(" groups - %i\n", mixerinfo.groups);
|
||||
printf(" switches - %i\n", mixerinfo.switches);
|
||||
printf(" attribute - 0x%x\n", mixerinfo.attribute);
|
||||
printf(" id - '%s'\n", mixerinfo.id);
|
||||
printf(" name - '%s'\n", mixerinfo.name);
|
||||
}
|
||||
|
|
|
|||
14
test/mixer.c
14
test/mixer.c
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
static void mixer_test(int card, int device)
|
||||
{
|
||||
int err, channels;
|
||||
int err;
|
||||
void *handle;
|
||||
snd_mixer_info_t info;
|
||||
|
||||
|
|
@ -13,20 +13,16 @@ static void mixer_test(int card, int device)
|
|||
return;
|
||||
}
|
||||
printf("Mixer %i/%i open ok...\n", card, device);
|
||||
channels = snd_mixer_channels(handle);
|
||||
if (channels < 0) {
|
||||
printf("Mixer channels error: %s\n", snd_strerror(channels));
|
||||
return;
|
||||
}
|
||||
printf(" Mixer have %i channel%s.\n", channels, channels > 1 ? "s" : "");
|
||||
if ((err = snd_mixer_info(handle, &info)) < 0) {
|
||||
printf("Mixer info error: %s\n", snd_strerror(err));
|
||||
return;
|
||||
}
|
||||
printf(" Info:\n");
|
||||
printf(" type - %i\n", info.type);
|
||||
printf(" channels - %i\n", info.channels);
|
||||
printf(" caps - 0x%x\n", info.caps);
|
||||
printf(" elements - %i\n", info.elements);
|
||||
printf(" groups - %i\n", info.groups);
|
||||
printf(" switches - %i\n", info.switches);
|
||||
printf(" attribute - 0x%x\n", info.attribute);
|
||||
printf(" id - '%s'\n", info.id);
|
||||
printf(" name - '%s'\n", info.name);
|
||||
snd_mixer_close(handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue