diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-02 15:24:53 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-02 15:24:53 +0000 |
commit | a48742043be3ecc3d0522ae48ff4401665d7e83f (patch) | |
tree | 7e4fe1effd2a924a6db19f61568deadd8644859f /libs | |
parent | 3dd7f05fb1a5a1bd693abb2098e0fb65a8686313 (diff) |
remove PBD::Connection (replace use with PBD::ScopedConnection); remove limitation on transport roll after session end
git-svn-id: svn://localhost/ardour2/branches/3.0@6834 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/audiosource.h | 2 | ||||
-rw-r--r-- | libs/ardour/audiosource.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_transport.cc | 10 | ||||
-rw-r--r-- | libs/midi++2/midi++/jack.h | 4 | ||||
-rw-r--r-- | libs/pbd/pbd/signals.h | 21 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/generic_midi_control_protocol.h | 2 |
6 files changed, 15 insertions, 26 deletions
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index c39dbdfd8c..e78fb049d7 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -72,7 +72,7 @@ class AudioSource : virtual public Source, framepos_t start, framecnt_t cnt, double samples_per_visual_peak) const; int build_peaks (); - bool peaks_ready (boost::function<void()> callWhenReady, PBD::Connection& connection_created_if_not_ready, PBD::EventLoop* event_loop) const; + bool peaks_ready (boost::function<void()> callWhenReady, PBD::ScopedConnection& connection_created_if_not_ready, PBD::EventLoop* event_loop) const; mutable PBD::Signal0<void> PeaksReady; mutable PBD::Signal2<void,framepos_t,framepos_t> PeakRangeReady; diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index f3206412f8..8a367f32a7 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -149,7 +149,7 @@ AudioSource::update_length (sframes_t pos, sframes_t cnt) ***********************************************************************/ bool -AudioSource::peaks_ready (boost::function<void()> doThisWhenReady, Connection& connect_here_if_not, EventLoop* event_loop) const +AudioSource::peaks_ready (boost::function<void()> doThisWhenReady, ScopedConnection& connect_here_if_not, EventLoop* event_loop) const { bool ret; Glib::Mutex::Lock lm (_peaks_ready_lock); diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index db06a2d703..a7f347da5c 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -933,10 +933,6 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state) /* we are stopped and we want to start rolling at speed 1 */ - if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) { - return; - } - if (Config->get_monitoring_model() == HardwareMonitoring) { boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader(); @@ -957,12 +953,6 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state) } else { - /* if not recording, don't roll forward past end if told to stop there */ - - if (!get_record_enabled() && (speed > 0.0 && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame())) { - return; - } - if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) { warning << string_compose (_("Global varispeed cannot be supported while %1 is connected to JACK transport control"), PROGRAM_NAME) diff --git a/libs/midi++2/midi++/jack.h b/libs/midi++2/midi++/jack.h index fbc640b161..b720166b49 100644 --- a/libs/midi++2/midi++/jack.h +++ b/libs/midi++2/midi++/jack.h @@ -89,8 +89,8 @@ private: CrossThreadChannel xthread; std::string _inbound_connections; std::string _outbound_connections; - PBD::Connection connect_connection; - PBD::Connection halt_connection; + PBD::ScopedConnection connect_connection; + PBD::ScopedConnection halt_connection; void flush (void* jack_port_buffer); void jack_halted (); void make_connections(); diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index 8e2b120b10..cfbbc949c9 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -33,7 +33,6 @@ namespace PBD { typedef boost::signals2::connection UnscopedConnection; -typedef boost::signals2::connection Connection; typedef boost::signals2::scoped_connection ScopedConnection; class ScopedConnectionList : public boost::noncopyable @@ -77,7 +76,7 @@ public: Signal0 () {} typedef boost::signals2::signal<R()> SignalType; - void connect_same_thread (Connection& c, + void connect_same_thread (ScopedConnection& c, const typename SignalType::slot_function_type& slot) { c = _signal.connect (slot); } @@ -94,7 +93,7 @@ public: clist.add_connection (_signal.connect (boost::bind (&EventLoop::call_slot, event_loop, ir, slot))); } - void connect (Connection& c, + void connect (ScopedConnection& c, PBD::EventLoop::InvalidationRecord* ir, const typename SignalType::slot_function_type& slot, PBD::EventLoop* event_loop) { @@ -122,7 +121,7 @@ public: clist.add_connection (_signal.connect (slot)); } - void connect_same_thread (Connection& c, + void connect_same_thread (ScopedConnection& c, const typename SignalType::slot_function_type& slot) { c = _signal.connect (slot); } @@ -138,7 +137,7 @@ public: clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1))); } - void connect (Connection& c, + void connect (ScopedConnection& c, PBD::EventLoop::InvalidationRecord* ir, const typename SignalType::slot_function_type& slot, PBD::EventLoop* event_loop) { @@ -167,7 +166,7 @@ public: clist.add_connection (_signal.connect (slot)); } - void connect_same_thread (Connection& c, + void connect_same_thread (ScopedConnection& c, const typename SignalType::slot_function_type& slot) { c = _signal.connect (slot); } @@ -185,7 +184,7 @@ public: clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2))); } - void connect (Connection& c, + void connect (ScopedConnection& c, PBD::EventLoop::InvalidationRecord* ir, const typename SignalType::slot_function_type& slot, PBD::EventLoop* event_loop) { @@ -213,7 +212,7 @@ public: clist.add_connection (_signal.connect (slot)); } - void connect_same_thread (Connection& c, + void connect_same_thread (ScopedConnection& c, const typename SignalType::slot_function_type& slot) { c = _signal.connect (slot); } @@ -231,7 +230,7 @@ public: clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3))); } - void connect (Connection& c, + void connect (ScopedConnection& c, PBD::EventLoop::InvalidationRecord* ir, const typename SignalType::slot_function_type& slot, PBD::EventLoop* event_loop) { @@ -259,7 +258,7 @@ public: clist.add_connection (_signal.connect (slot)); } - void connect_same_thread (Connection& c, + void connect_same_thread (ScopedConnection& c, const typename SignalType::slot_function_type& slot) { c = _signal.connect (slot); } @@ -277,7 +276,7 @@ public: clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3, _4))); } - void connect (Connection& c, + void connect (ScopedConnection& c, PBD::EventLoop::InvalidationRecord* ir, const typename SignalType::slot_function_type& slot, PBD::EventLoop* event_loop) { diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.h b/libs/surfaces/generic_midi/generic_midi_control_protocol.h index 050bde5050..e0867fad78 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.h +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.h @@ -94,7 +94,7 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol { typedef std::list<MIDIFunction*> MIDIFunctions; MIDIFunctions functions; - typedef std::pair<MIDIControllable*,PBD::Connection> MIDIPendingControllable; + typedef std::pair<MIDIControllable*,PBD::ScopedConnection> MIDIPendingControllable; typedef std::list<MIDIPendingControllable* > MIDIPendingControllables; MIDIPendingControllables pending_controllables; Glib::Mutex controllables_lock; |