mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
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
This commit is contained in:
parent
3dd7f05fb1
commit
a48742043b
7 changed files with 16 additions and 27 deletions
|
|
@ -54,7 +54,7 @@ class MidiTracer : public ArdourDialog
|
||||||
|
|
||||||
void connect ();
|
void connect ();
|
||||||
void disconnect ();
|
void disconnect ();
|
||||||
PBD::Connection connection;
|
PBD::ScopedConnection connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_gtk_midi_tracer_h__ */
|
#endif /* __ardour_gtk_midi_tracer_h__ */
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ class AudioSource : virtual public Source,
|
||||||
framepos_t start, framecnt_t cnt, double samples_per_visual_peak) const;
|
framepos_t start, framecnt_t cnt, double samples_per_visual_peak) const;
|
||||||
|
|
||||||
int build_peaks ();
|
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::Signal0<void> PeaksReady;
|
||||||
mutable PBD::Signal2<void,framepos_t,framepos_t> PeakRangeReady;
|
mutable PBD::Signal2<void,framepos_t,framepos_t> PeakRangeReady;
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ AudioSource::update_length (sframes_t pos, sframes_t cnt)
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
bool
|
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;
|
bool ret;
|
||||||
Glib::Mutex::Lock lm (_peaks_ready_lock);
|
Glib::Mutex::Lock lm (_peaks_ready_lock);
|
||||||
|
|
|
||||||
|
|
@ -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 */
|
/* 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) {
|
if (Config->get_monitoring_model() == HardwareMonitoring) {
|
||||||
|
|
||||||
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
|
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
|
||||||
|
|
@ -957,12 +953,6 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
|
||||||
|
|
||||||
} else {
|
} 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) {
|
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"),
|
warning << string_compose (_("Global varispeed cannot be supported while %1 is connected to JACK transport control"),
|
||||||
PROGRAM_NAME)
|
PROGRAM_NAME)
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,8 @@ private:
|
||||||
CrossThreadChannel xthread;
|
CrossThreadChannel xthread;
|
||||||
std::string _inbound_connections;
|
std::string _inbound_connections;
|
||||||
std::string _outbound_connections;
|
std::string _outbound_connections;
|
||||||
PBD::Connection connect_connection;
|
PBD::ScopedConnection connect_connection;
|
||||||
PBD::Connection halt_connection;
|
PBD::ScopedConnection halt_connection;
|
||||||
void flush (void* jack_port_buffer);
|
void flush (void* jack_port_buffer);
|
||||||
void jack_halted ();
|
void jack_halted ();
|
||||||
void make_connections();
|
void make_connections();
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
namespace PBD {
|
namespace PBD {
|
||||||
|
|
||||||
typedef boost::signals2::connection UnscopedConnection;
|
typedef boost::signals2::connection UnscopedConnection;
|
||||||
typedef boost::signals2::connection Connection;
|
|
||||||
typedef boost::signals2::scoped_connection ScopedConnection;
|
typedef boost::signals2::scoped_connection ScopedConnection;
|
||||||
|
|
||||||
class ScopedConnectionList : public boost::noncopyable
|
class ScopedConnectionList : public boost::noncopyable
|
||||||
|
|
@ -77,7 +76,7 @@ public:
|
||||||
Signal0 () {}
|
Signal0 () {}
|
||||||
typedef boost::signals2::signal<R()> SignalType;
|
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) {
|
const typename SignalType::slot_function_type& slot) {
|
||||||
c = _signal.connect (slot);
|
c = _signal.connect (slot);
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +93,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (boost::bind (&EventLoop::call_slot, event_loop, ir, slot)));
|
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,
|
PBD::EventLoop::InvalidationRecord* ir,
|
||||||
const typename SignalType::slot_function_type& slot,
|
const typename SignalType::slot_function_type& slot,
|
||||||
PBD::EventLoop* event_loop) {
|
PBD::EventLoop* event_loop) {
|
||||||
|
|
@ -122,7 +121,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (slot));
|
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) {
|
const typename SignalType::slot_function_type& slot) {
|
||||||
c = _signal.connect (slot);
|
c = _signal.connect (slot);
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +137,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1)));
|
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,
|
PBD::EventLoop::InvalidationRecord* ir,
|
||||||
const typename SignalType::slot_function_type& slot,
|
const typename SignalType::slot_function_type& slot,
|
||||||
PBD::EventLoop* event_loop) {
|
PBD::EventLoop* event_loop) {
|
||||||
|
|
@ -167,7 +166,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (slot));
|
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) {
|
const typename SignalType::slot_function_type& slot) {
|
||||||
c = _signal.connect (slot);
|
c = _signal.connect (slot);
|
||||||
}
|
}
|
||||||
|
|
@ -185,7 +184,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2)));
|
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,
|
PBD::EventLoop::InvalidationRecord* ir,
|
||||||
const typename SignalType::slot_function_type& slot,
|
const typename SignalType::slot_function_type& slot,
|
||||||
PBD::EventLoop* event_loop) {
|
PBD::EventLoop* event_loop) {
|
||||||
|
|
@ -213,7 +212,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (slot));
|
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) {
|
const typename SignalType::slot_function_type& slot) {
|
||||||
c = _signal.connect (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)));
|
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,
|
PBD::EventLoop::InvalidationRecord* ir,
|
||||||
const typename SignalType::slot_function_type& slot,
|
const typename SignalType::slot_function_type& slot,
|
||||||
PBD::EventLoop* event_loop) {
|
PBD::EventLoop* event_loop) {
|
||||||
|
|
@ -259,7 +258,7 @@ public:
|
||||||
clist.add_connection (_signal.connect (slot));
|
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) {
|
const typename SignalType::slot_function_type& slot) {
|
||||||
c = _signal.connect (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)));
|
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,
|
PBD::EventLoop::InvalidationRecord* ir,
|
||||||
const typename SignalType::slot_function_type& slot,
|
const typename SignalType::slot_function_type& slot,
|
||||||
PBD::EventLoop* event_loop) {
|
PBD::EventLoop* event_loop) {
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
|
||||||
typedef std::list<MIDIFunction*> MIDIFunctions;
|
typedef std::list<MIDIFunction*> MIDIFunctions;
|
||||||
MIDIFunctions functions;
|
MIDIFunctions functions;
|
||||||
|
|
||||||
typedef std::pair<MIDIControllable*,PBD::Connection> MIDIPendingControllable;
|
typedef std::pair<MIDIControllable*,PBD::ScopedConnection> MIDIPendingControllable;
|
||||||
typedef std::list<MIDIPendingControllable* > MIDIPendingControllables;
|
typedef std::list<MIDIPendingControllable* > MIDIPendingControllables;
|
||||||
MIDIPendingControllables pending_controllables;
|
MIDIPendingControllables pending_controllables;
|
||||||
Glib::Mutex controllables_lock;
|
Glib::Mutex controllables_lock;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue