catch (incorrect) inclusion of non-MIDI related automation parameters in MidiSource...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 23 Feb 2018 19:56:58 +0000 (14:56 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 23 Feb 2018 19:57:04 +0000 (14:57 -0500)
libs/ardour/midi_source.cc

index d7bc4d333e7fe1b7feeb973d9500a10fde015780..18efd4e9ea1588052fcfc3f825ccdbc630faee91 100644 (file)
@@ -123,6 +123,20 @@ MidiSource::set_state (const XMLNode& node, int /*version*/)
                        }
                        Evoral::Parameter p = EventTypeMap::instance().from_symbol (str);
 
+                       switch (p.type()) {
+                       case MidiCCAutomation:
+                       case MidiPgmChangeAutomation:       break;
+                       case MidiChannelPressureAutomation: break;
+                       case MidiNotePressureAutomation:    break;
+                       case MidiPitchBenderAutomation:     break;
+                       case MidiSystemExclusiveAutomation:
+                               cerr << "Parameter \"" << str << "\" is system exclusive - no automation possible!\n";
+                               continue;
+                       default:
+                               cerr << "Parameter \"" << str << "\" found for MIDI source ... not legal; ignoring this parameter\n";
+                               continue;
+                       }
+
                        if (!(*i)->get_property (X_("style"), str)) {
                                error << _("Missing style property on InterpolationStyle") << endmsg;
                                return -1;