projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
assert() to help find some possible causes of #2991. Fix some confusion with GTK...
[ardour.git]
/
libs
/
ardour
/
internal_send.cc
diff --git
a/libs/ardour/internal_send.cc
b/libs/ardour/internal_send.cc
index d70889a27c922445a5a65ecf83461d12cf183b74..4a4823a29f0b7efbbebbe18b688f8e987080abc0 100644
(file)
--- a/
libs/ardour/internal_send.cc
+++ b/
libs/ardour/internal_send.cc
@@
-43,13
+43,16
@@
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost:
set_name (sendto->name());
set_name (sendto->name());
- _send_to->GoingAway.connect (mem_fun (*this, &InternalSend::send_to_going_away));
+ _send_to->DropReferences.connect_same_thread (*this, boost::bind (&InternalSend::send_to_going_away, this));
+ _send_to->NameChanged.connect_same_thread (*this, boost::bind (&InternalSend::send_to_name_changed, this));
}
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
}
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
- : Send (s, mm, node, Delivery::Aux /* will be reset in set_state() */)
+ : Send (s, mm, node, Stateful::loading_state_version, Delivery::Aux /* will be reset in set_state() */),
+ target (0)
{
{
- set_state (node, Stateful::loading_state_version);
+ /* Send constructor will set its state, so here we just need to set up our own */
+ set_our_state (node, Stateful::loading_state_version);
}
InternalSend::~InternalSend ()
}
InternalSend::~InternalSend ()
@@
-70,7
+73,7
@@
InternalSend::send_to_going_away ()
}
void
}
void
-InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
+InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes
, bool
)
{
if ((!_active && !_pending_active) || !target || !_send_to) {
_meter->reset ();
{
if ((!_active && !_pending_active) || !target || !_send_to) {
_meter->reset ();
@@
-109,12
+112,11
@@
InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
Amp::apply_simple_gain (mixbufs, nframes, tgain);
}
Amp::apply_simple_gain (mixbufs, nframes, tgain);
}
-
// Can't automate gain for sends or returns yet because we need different buffers
// so that we don't overwrite the main automation data for the route amp
// _amp->setup_gain_automation (start_frame, end_frame, nframes);
// Can't automate gain for sends or returns yet because we need different buffers
// so that we don't overwrite the main automation data for the route amp
// _amp->setup_gain_automation (start_frame, end_frame, nframes);
- _amp->run (mixbufs, start_frame, end_frame, nframes);
+ _amp->run (mixbufs, start_frame, end_frame, nframes
, true
);
/* XXX NEED TO PAN */
/* XXX NEED TO PAN */
@@
-124,7
+126,7
@@
InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
if (_amp->gain_control()->get_value() == 0) {
_meter->reset();
} else {
if (_amp->gain_control()->get_value() == 0) {
_meter->reset();
} else {
- _meter->run (mixbufs, start_frame, end_frame, nframes);
+ _meter->run (mixbufs, start_frame, end_frame, nframes
, true
);
}
}
}
}
@@
-153,7
+155,7
@@
InternalSend::state (bool full)
{
XMLNode& node (Send::state (full));
{
XMLNode& node (Send::state (full));
- /* this replaces any existing property */
+ /* this replaces any existing
"type"
property */
node.add_property ("type", "intsend");
node.add_property ("type", "intsend");
@@
-171,12
+173,10
@@
InternalSend::get_state()
}
int
}
int
-InternalSend::set_
state (const XMLNode& node, int version
)
+InternalSend::set_
our_state (const XMLNode& node, int /*version*/
)
{
const XMLProperty* prop;
{
const XMLProperty* prop;
- Send::set_state (node, version);
-
if ((prop = node.property ("target")) != 0) {
_send_to_id = prop->value();
if ((prop = node.property ("target")) != 0) {
_send_to_id = prop->value();
@@
-187,7
+187,7
@@
InternalSend::set_state (const XMLNode& node, int version)
*/
if (!IO::connecting_legal) {
*/
if (!IO::connecting_legal) {
-
connect_c = IO::ConnectingLegal.connect (mem_fun (*this, &InternalSend::connect_when_legal
));
+
IO::ConnectingLegal.connect_same_thread (connect_c, boost::bind (&InternalSend::connect_when_legal, this
));
} else {
connect_when_legal ();
}
} else {
connect_when_legal ();
}
@@
-196,6
+196,13
@@
InternalSend::set_state (const XMLNode& node, int version)
return 0;
}
return 0;
}
+int
+InternalSend::set_state (const XMLNode& node, int version)
+{
+ Send::set_state (node, version);
+ return set_our_state (node, version);
+}
+
int
InternalSend::connect_when_legal ()
{
int
InternalSend::connect_when_legal ()
{
@@
-260,3
+267,9
@@
InternalSend::visible () const
return false;
}
return false;
}
+
+void
+InternalSend::send_to_name_changed ()
+{
+ set_name (_send_to->name ());
+}