mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Added midi devices..
This commit is contained in:
parent
fc69109d69
commit
924d53cccc
1 changed files with 12 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ int main(void)
|
||||||
struct snd_ctl_hw_info info;
|
struct snd_ctl_hw_info info;
|
||||||
snd_pcm_info_t pcminfo;
|
snd_pcm_info_t pcminfo;
|
||||||
snd_mixer_info_t mixerinfo;
|
snd_mixer_info_t mixerinfo;
|
||||||
|
snd_rawmidi_info_t rawmidiinfo;
|
||||||
char str[128];
|
char str[128];
|
||||||
|
|
||||||
cards = snd_cards();
|
cards = snd_cards();
|
||||||
|
|
@ -59,11 +60,21 @@ int main(void)
|
||||||
printf(" type - %i\n", mixerinfo.type);
|
printf(" type - %i\n", mixerinfo.type);
|
||||||
printf(" elements - %i\n", mixerinfo.elements);
|
printf(" elements - %i\n", mixerinfo.elements);
|
||||||
printf(" groups - %i\n", mixerinfo.groups);
|
printf(" groups - %i\n", mixerinfo.groups);
|
||||||
printf(" switches - %i\n", mixerinfo.switches);
|
|
||||||
printf(" attrib - 0x%x\n", mixerinfo.attrib);
|
printf(" attrib - 0x%x\n", mixerinfo.attrib);
|
||||||
printf(" id - '%s'\n", mixerinfo.id);
|
printf(" id - '%s'\n", mixerinfo.id);
|
||||||
printf(" name - '%s'\n", mixerinfo.name);
|
printf(" name - '%s'\n", mixerinfo.name);
|
||||||
}
|
}
|
||||||
|
for (idx1 = 0; idx1 < info.mididevs; idx1++) {
|
||||||
|
printf("RAWMIDI info, device #%i:\n", idx1);
|
||||||
|
if ((err = snd_ctl_rawmidi_info(handle, idx1, &rawmidiinfo)) < 0) {
|
||||||
|
printf(" MIXER info error: %s\n", snd_strerror(err));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
printf(" type - %i\n", rawmidiinfo.type);
|
||||||
|
printf(" flags - 0x%x\n", rawmidiinfo.flags);
|
||||||
|
printf(" id - '%s'\n", rawmidiinfo.id);
|
||||||
|
printf(" name - '%s'\n", rawmidiinfo.name);
|
||||||
|
}
|
||||||
snd_ctl_close(handle);
|
snd_ctl_close(handle);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue