mirror of
https://github.com/ZDoom/ZMusic.git
synced 2025-01-18 06:11:46 +00:00
- extended list MIDI devices sample
This commit is contained in:
parent
e02e7fb1ca
commit
af79a0bec0
1 changed files with 14 additions and 2 deletions
|
@ -4,11 +4,23 @@
|
|||
int main()
|
||||
{
|
||||
int count = 0;
|
||||
const MidiOutDevice *devices = ZMusic_GetMidiDevices(&count);
|
||||
const ZMusicMidiOutDevice *devices = ZMusic_GetMidiDevices(&count);
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
printf("[%i] %s\n", i, devices[i].Name);
|
||||
const ZMusicMidiOutDevice &d = devices[i];
|
||||
const char *tech = "<Unknown>";
|
||||
switch (d.Technology)
|
||||
{
|
||||
case MIDIDEV_MIDIPORT: tech = "MIDIPORT"; break;
|
||||
case MIDIDEV_SYNTH: tech = "SYNTH"; break;
|
||||
case MIDIDEV_SQSYNTH: tech = "SQSYNTH"; break;
|
||||
case MIDIDEV_FMSYNTH: tech = "FMSYNTH"; break;
|
||||
case MIDIDEV_MAPPER: tech = "MAPPER"; break;
|
||||
case MIDIDEV_WAVETABLE: tech = "WAVETABLE"; break;
|
||||
case MIDIDEV_SWSYNTH: tech = "SWSYNTH"; break;
|
||||
}
|
||||
printf("[%i] %i. %s: %s\n", i, d.ID, d.Name, tech);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue