Add method to find subgroup_bus
[ardour.git] / libs / ardour / midi_source.cc
index 6cfd0b6f21fed133e6057b1ffa1bbb25d935a2d2..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;
@@ -357,7 +371,7 @@ MidiSource::mark_streaming_write_started (const Lock& lock)
 void
 MidiSource::mark_midi_streaming_write_completed (const Lock&                                      lock,
                                                  Evoral::Sequence<Temporal::Beats>::StuckNoteOption option,
-                                                 Temporal::Beats                                    end)
+                                                 Temporal::Beats                                  end)
 {
        if (_model) {
                _model->end_write (option, end);