diff options
author | Carl Hetherington <carl@carlh.net> | 2010-07-08 22:55:20 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-07-08 22:55:20 +0000 |
commit | 648a169d8ff9987ba727e9ba50af4f33da6db165 (patch) | |
tree | d8e250205004633a9f5c94e15e8f3826fac183b6 /libs/ardour/rc_configuration.cc | |
parent | 3549189f87813b8c9f01f2f6484b34cf923a65ad (diff) |
Move MIDI control port ownership into the MIDI Manager, since control port state should be Ardour-wide, not per-session. Fix up port connection state management.
git-svn-id: svn://localhost/ardour2/branches/3.0@7394 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/rc_configuration.cc')
-rw-r--r-- | libs/ardour/rc_configuration.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc index a50a994f87..3ca4868f63 100644 --- a/libs/ardour/rc_configuration.cc +++ b/libs/ardour/rc_configuration.cc @@ -68,6 +68,10 @@ RCConfiguration::RCConfiguration () RCConfiguration::~RCConfiguration () { + for (list<XMLNode*>::iterator i = _midi_port_states.begin(); i != _midi_port_states.end(); ++i) { + delete *i; + } + delete _control_protocol_state; } @@ -254,19 +258,24 @@ RCConfiguration::set_state (const XMLNode& root, int /*version*/) XMLNodeConstIterator niter; XMLNode *node; + for (list<XMLNode*>::iterator i = _midi_port_states.begin(); i != _midi_port_states.end(); ++i) { + delete *i; + } + + _midi_port_states.clear (); + for (niter = nlist.begin(); niter != nlist.end(); ++niter) { node = *niter; if (node->name() == "Config") { - set_variables (*node); - } else if (node->name() == "Extra") { _extra_xml = new XMLNode (*node); - } else if (node->name() == ControlProtocolManager::state_node_name) { _control_protocol_state = new XMLNode (*node); + } else if (node->name() == MIDI::Port::state_node_name) { + _midi_port_states.push_back (new XMLNode (*node)); } } |