Ardour  9.0-pre0-582-g084a23a80d
internal_send.h
Go to the documentation of this file.
1 /*
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>
7  *
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.
12  *
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.
17  *
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.
21  */
22 
23 #pragma once
24 
25 #include "ardour/ardour.h"
26 #include "ardour/send.h"
27 
28 namespace ARDOUR {
29 
31 {
32 public:
33  InternalSend (Session&, std::shared_ptr<Pannable>, std::shared_ptr<MuteMaster>, std::shared_ptr<Route> send_from, std::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false);
34  virtual ~InternalSend ();
35 
36  std::string display_name() const;
37  bool set_name (const std::string&);
38  bool visible() const;
39 
40  int set_state(const XMLNode& node, int version);
41 
43  void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool);
44  bool feeds (std::shared_ptr<Route> other) const;
48 
49  std::shared_ptr<Route> source_route() const { return _send_from; }
50  std::shared_ptr<Route> target_route() const { return _send_to; }
51  const PBD::ID& target_id() const { return _send_to_id; }
52 
53  BufferSet const & get_buffers () const {
54  return mixbufs;
55  }
56 
57  bool allow_feedback () const { return _allow_feedback;}
58  void set_allow_feedback (bool yn);
59 
60  void set_can_pan (bool yn);
61  uint32_t pan_outs () const;
62 
64 
65 protected:
66  XMLNode& state() const;
67 
68 private:
70  std::shared_ptr<Route> _send_from;
71  std::shared_ptr<Route> _send_to;
77 
81  int after_connect ();
82  void init_gain ();
83  int use_target (std::shared_ptr<Route>, bool update_name = true);
85  void ensure_mixbufs ();
86 
87  void propagate_solo ();
88 };
89 
90 } // namespace ARDOUR
91 
std::string display_name() const
PBD::ScopedConnection connect_c
Definition: internal_send.h:74
const PBD::ID & target_id() const
Definition: internal_send.h:51
bool configure_io(ChanCount in, ChanCount out)
PBD::ScopedConnection source_connection
Definition: internal_send.h:75
bool feeds(std::shared_ptr< Route > other) const
InternalSend(Session &, std::shared_ptr< Pannable >, std::shared_ptr< MuteMaster >, std::shared_ptr< Route > send_from, std::shared_ptr< Route > send_to, Delivery::Role role=Delivery::Aux, bool ignore_bitslot=false)
void set_allow_feedback(bool yn)
bool set_name(const std::string &)
void set_can_pan(bool yn)
uint32_t pan_outs() const
static PBD::Signal< void(pframes_t)> CycleStart
Definition: internal_send.h:63
int set_block_size(pframes_t)
BufferSet const & get_buffers() const
Definition: internal_send.h:53
int set_state(const XMLNode &node, int version)
XMLNode & state() const
PBD::ScopedConnectionList target_connections
Definition: internal_send.h:76
void send_to_property_changed(const PBD::PropertyChange &)
bool allow_feedback() const
Definition: internal_send.h:57
bool visible() const
void run(BufferSet &bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool)
void cycle_start(pframes_t)
std::shared_ptr< Route > source_route() const
Definition: internal_send.h:49
int use_target(std::shared_ptr< Route >, bool update_name=true)
bool can_support_io_configuration(const ChanCount &in, ChanCount &out)
std::shared_ptr< Route > target_route() const
Definition: internal_send.h:50
std::shared_ptr< Route > _send_from
Definition: internal_send.h:70
std::shared_ptr< Route > _send_to
Definition: internal_send.h:71
Definition: id.h:34
Definition: xml++.h:114
#define LIBARDOUR_API
uint32_t pframes_t
Temporal::samplepos_t samplepos_t