2 * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
3 * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
4 * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
5 * Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
6 * Copyright (C) 2018 Len Ovens <len@ovenwerks.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __ardour_internal_send_h__
24 #define __ardour_internal_send_h__
26 #include "ardour/ardour.h"
27 #include "ardour/send.h"
31 class LIBARDOUR_API InternalSend : public Send
34 InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_from, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false);
35 virtual ~InternalSend ();
37 std::string display_name() const;
38 bool set_name (const std::string&);
41 int set_state(const XMLNode& node, int version);
43 void cycle_start (pframes_t);
44 void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool);
45 bool feeds (boost::shared_ptr<Route> other) const;
46 bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
47 bool configure_io (ChanCount in, ChanCount out);
48 int set_block_size (pframes_t);
50 boost::shared_ptr<Route> source_route() const { return _send_from; }
51 boost::shared_ptr<Route> target_route() const { return _send_to; }
52 const PBD::ID& target_id() const { return _send_to_id; }
54 BufferSet const & get_buffers () const {
58 bool allow_feedback () const { return _allow_feedback;}
59 void set_allow_feedback (bool yn);
61 void set_can_pan (bool yn);
62 uint32_t pan_outs () const;
64 static PBD::Signal1<void, pframes_t> CycleStart;
71 boost::shared_ptr<Route> _send_from;
72 boost::shared_ptr<Route> _send_to;
75 PBD::ScopedConnection connect_c;
76 PBD::ScopedConnection source_connection;
77 PBD::ScopedConnectionList target_connections;
79 void send_from_going_away ();
80 void send_to_going_away ();
81 void send_to_property_changed (const PBD::PropertyChange&);
82 int connect_when_legal ();
84 int use_target (boost::shared_ptr<Route>);
85 void target_io_changed ();
90 #endif /* __ardour_send_h__ */