+struct AlsaAudioBackend::AlsaMidiDeviceInfo *
+AlsaAudioBackend::midi_device_info(std::string const name) const {
+ for (std::map<std::string, struct AlsaMidiDeviceInfo*>::const_iterator i = _midi_devices.begin (); i != _midi_devices.end(); ++i) {
+ if (i->first == name) {
+ return (i->second);
+ }
+ }
+
+ std::map<std::string, std::string> devices;
+ get_alsa_rawmidi_device_names(devices);
+ for (std::map<std::string, std::string>::const_iterator i = devices.begin (); i != devices.end(); ++i) {
+ if (i->first == name) {
+ _midi_devices[name] = new AlsaMidiDeviceInfo();
+ return _midi_devices[name];
+ }
+ }
+ return 0;
+}
+