diff options
author | Carl Hetherington <carl@carlh.net> | 2011-09-26 20:35:16 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-09-26 20:35:16 +0000 |
commit | a7dc433498d712b908c429761a4c3f9ea24ce440 (patch) | |
tree | c64400e690144c9136102fdf72160f2011d2fbb7 /libs/midi++2/manager.cc | |
parent | d6112f121313f6db8353e32c1339f84cd1e59608 (diff) |
Delete MIDI port objects when the MackieControlProtocol is torn down, so that it can be recreated without attempting to create duplicate JACK port names. Should fix #3886.
git-svn-id: svn://localhost/ardour2/branches/3.0@10129 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/manager.cc')
-rw-r--r-- | libs/midi++2/manager.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/midi++2/manager.cc b/libs/midi++2/manager.cc index 8aa89c7a99..b411a1ddad 100644 --- a/libs/midi++2/manager.cc +++ b/libs/midi++2/manager.cc @@ -77,6 +77,16 @@ Manager::add_port (Port* p) } void +Manager::remove_port (Port* p) +{ + RCUWriter<PortList> writer (_ports); + boost::shared_ptr<PortList> pw = writer.get_copy (); + pw->remove (p); + + PortsChanged (); /* EMIT SIGNAL */ +} + +void Manager::cycle_start (pframes_t nframes) { boost::shared_ptr<PortList> pr = _ports.reader (); |