/*
- Copyright (C) 2009 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2009-2012 David Robillard <d@drobilla.net>
+ * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2018 Len Ovens <len@ovenwerks.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
_send_to->remove_send_from_internal_return (this);
}
- _send_to = sendto;
+ _send_to = sendto;
- _send_to->add_send_to_internal_return (this);
+ _send_to->add_send_to_internal_return (this);
mixbufs.ensure_buffers (_send_to->internal_return()->input_streams(), _session.get_block_size());
mixbufs.set_count (_send_to->internal_return()->input_streams());
reset_panner ();
- set_name (sendto->name());
- _send_to_id = _send_to->id();
+ set_name (sendto->name());
+ _send_to_id = _send_to->id();
- target_connections.drop_connections ();
+ target_connections.drop_connections ();
- _send_to->DropReferences.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_going_away, this));
- _send_to->PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_property_changed, this, _1));
- _send_to->io_changed.connect_same_thread (target_connections, boost::bind (&InternalSend::target_io_changed, this));
+ _send_to->DropReferences.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_going_away, this));
+ _send_to->PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_property_changed, this, _1));
+ _send_to->io_changed.connect_same_thread (target_connections, boost::bind (&InternalSend::target_io_changed, this));
- return 0;
+ return 0;
}
void
void
InternalSend::send_to_going_away ()
{
- target_connections.drop_connections ();
+ target_connections.drop_connections ();
_send_to.reset ();
_send_to_id = "0";
}
mixbufs.ensure_buffers (_send_to->internal_return()->input_streams(), nframes);
}
- return 0;
+ return 0;
}
void
return 0;
}
- boost::shared_ptr<Route> sendto;
+ boost::shared_ptr<Route> sendto;
if ((sendto = _session.route_by_id (_send_to_id)) == 0) {
error << string_compose (_("%1 - cannot find any track/bus with the ID %2 to connect to"), display_name(), _send_to_id) << endmsg;
return -1;
}
- return use_target (sendto);
+ return use_target (sendto);
}
bool