Ardour  9.0-pre0-582-g084a23a80d
route.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2019 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2006-2014 David Robillard <d@drobilla.net>
4  * Copyright (C) 2008-2012 Carl Hetherington <carl@carlh.net>
5  * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
6  * Copyright (C) 2015-2018 Ben Loftis <ben@harrisonconsoles.com>
7  * Copyright (C) 2015-2018 Len Ovens <len@ovenwerks.net>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 #pragma once
25 
26 #include <atomic>
27 #include <cmath>
28 #include <cstring>
29 #include <list>
30 #include <map>
31 #include <memory>
32 #include <set>
33 #include <string>
34 
35 #include <glibmm/threads.h>
36 #include "pbd/fastlog.h"
37 #include "pbd/xml++.h"
38 #include "pbd/undo.h"
39 #include "pbd/stateful.h"
40 #include "pbd/controllable.h"
41 #include "pbd/destructible.h"
42 
43 #include "temporal/domain_swap.h"
44 #include "temporal/types.h"
45 
46 #include "ardour/ardour.h"
47 #include "ardour/gain_control.h"
48 #include "ardour/instrument_info.h"
49 #include "ardour/io.h"
50 #include "ardour/io_vector.h"
52 #include "ardour/types.h"
53 #include "ardour/monitorable.h"
54 #include "ardour/muteable.h"
55 #include "ardour/mute_master.h"
56 #include "ardour/mute_control.h"
58 #include "ardour/stripable.h"
59 #include "ardour/graphnode.h"
60 #include "ardour/automatable.h"
62 #include "ardour/soloable.h"
63 #include "ardour/solo_control.h"
65 #include "ardour/slavable.h"
66 
69 
70 namespace ARDOUR {
71 
72 class Amp;
73 class BeatBox;
74 class DelayLine;
75 class Delivery;
76 class DiskReader;
77 class DiskWriter;
78 class IOProcessor;
79 class Panner;
80 class PannerShell;
81 class PolarityProcessor;
82 class PortSet;
83 class Processor;
84 class PluginInsert;
85 class RouteGroup;
86 class Send;
87 class InternalReturn;
88 class Location;
89 class MonitorControl;
90 class MonitorProcessor;
91 class Pannable;
92 class CapturingProcessor;
93 class InternalSend;
94 class VCA;
95 class SoloIsolateControl;
96 class PhaseControl;
97 class MonitorControl;
98 class TriggerBox;
99 class SurroundReturn;
100 class SurroundSend;
101 
103  public GraphNode,
104  public Soloable,
105  public Muteable,
106  public Monitorable,
107  public RouteGroupMember
108 {
109 public:
110 
111  typedef std::list<std::shared_ptr<Processor> > ProcessorList;
112 
114  virtual ~Route();
115 
116  virtual int init ();
117 
118  DataType data_type () const {
119  /* XXX ultimately nice to do away with this concept, but it is
120  quite useful for coders and for users too.
121  */
122  return _default_type;
123  }
124 
125  std::shared_ptr<IO> input() const { return _input; }
126  std::shared_ptr<IO> output() const { return _output; }
129 
130  ChanCount n_inputs() const { return _input->n_ports(); }
131  ChanCount n_outputs() const { return _output->n_ports(); }
132 
133  bool active() const { return _active; }
134  void set_active (bool yn, void *);
135 
136  std::string ensure_track_or_route_name (std::string) const;
137 
138  std::string comment() { return _comment; }
139  void set_comment (std::string str, void *src);
140 
141  bool set_name (const std::string& str);
142  static void set_name_in_state (XMLNode &, const std::string &);
143 
144  std::shared_ptr<MonitorControl> monitoring_control() const { return _monitoring_control; }
145  std::shared_ptr<SurroundSend> surround_send() const { return _surround_send; }
146  std::shared_ptr<SurroundReturn> surround_return() const { return _surround_return; }
147 
149  virtual MonitorState get_input_monitoring_state (bool recording, bool talkback) const { return MonitoringSilence; }
150 
151  /* these are the core of the API of a Route. see the protected sections as well */
152 
153  virtual void filter_input (BufferSet &) {}
154 
155  int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
156 
157  int no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing);
158 
160 
161  virtual bool declick_in_progress () const { return false; }
162  virtual bool can_record() { return false; }
163 
166 
167  virtual void realtime_locate (bool) {}
170 
171  /* end of vfunc-based API */
172 
173  void shift (timepos_t const &, timecnt_t const &);
174  void cut_copy_section (timepos_t const& start, timepos_t const& end, timepos_t const& to, SectionOperation const op);
175 
176  /* controls use set_solo() to modify this route's solo state */
177 
179 
180  bool soloed_by_others () const { return _solo_control->soloed_by_others(); }
181  bool soloed_by_others_upstream () const { return _solo_control->soloed_by_others_upstream(); }
182  bool soloed_by_others_downstream () const { return _solo_control->soloed_by_others_downstream(); }
183  bool self_soloed () const { return _solo_control->self_soloed(); }
184  bool soloed () const { return self_soloed () || soloed_by_others (); }
185 
186  void push_solo_upstream (int32_t delta);
187  void push_solo_isolate_upstream (int32_t delta);
188  bool can_solo () const {
189  return !(is_singleton() || is_auditioner() || is_foldbackbus());
190  }
191  bool is_safe () const {
192  return _solo_safe_control->get_value();
193  }
194  bool can_monitor () const {
195  return can_solo() || is_foldbackbus ();
196  }
199 
200  void set_denormal_protection (bool yn);
201  bool denormal_protection() const;
202 
206  MeterPoint meter_point() const { return _pending_meter_point; }
207 
209 
212 
214  DiskIOPoint disk_io_point() const { return _disk_io_point; }
215 
216  void stop_triggers (bool now);
218 
219  /* Processors */
220 
221  std::shared_ptr<Amp> amp() const { return _amp; }
222  std::shared_ptr<Amp> trim() const { return _trim; }
223  std::shared_ptr<PolarityProcessor> polarity() const { return _polarity; }
224  std::shared_ptr<PeakMeter> peak_meter() { return _meter; }
225  std::shared_ptr<const PeakMeter> peak_meter() const { return _meter; }
226  std::shared_ptr<PeakMeter> shared_peak_meter() const { return _meter; }
227  std::shared_ptr<TriggerBox> triggerbox() const { return _triggerbox; }
228 
230 
231  void foreach_processor (std::function<void(std::weak_ptr<Processor>)> method) const {
232  Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
233  for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
234  method (std::weak_ptr<Processor> (*i));
235  }
236  }
237 
238  std::shared_ptr<Processor> nth_processor (uint32_t n) {
239  Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
240  ProcessorList::iterator i;
241  for (i = _processors.begin(); i != _processors.end() && n; ++i, --n) {}
242  if (i == _processors.end()) {
243  return std::shared_ptr<Processor> ();
244  } else {
245  return *i;
246  }
247  }
248 
249  std::shared_ptr<Processor> processor_by_id (PBD::ID) const;
250 
251  std::shared_ptr<Processor> nth_plugin (uint32_t n) const;
252  std::shared_ptr<Processor> nth_send (uint32_t n) const;
253 
254  bool has_io_processor_named (const std::string&);
255  ChanCount max_processor_streams () const { return processor_max_streams; }
256 
257  std::list<std::string> unknown_processors () const;
258 
259  RoutePinWindowProxy * pinmgr_proxy () const { return _pinmgr_proxy; }
260  void set_pingmgr_proxy (RoutePinWindowProxy* wp) { _pinmgr_proxy = wp ; }
261 
262  PatchChangeGridDialog* patch_selector_dialog () const { return _patch_selector_dialog; }
263  void set_patch_selector_dialog (PatchChangeGridDialog* d) { _patch_selector_dialog = d; }
264 
265  std::shared_ptr<AutomationControl> automation_control_recurse (PBD::ID const & id) const;
266 
268 
270  _pending_surround_send.store (1);
271  }
272 
273  /* special processors */
274 
275  std::shared_ptr<InternalSend> monitor_send() const { return _monitor_send; }
277  std::shared_ptr<Delivery> main_outs() const { return _main_outs; }
278  std::shared_ptr<InternalReturn> internal_return() const { return _intreturn; }
279  std::shared_ptr<MonitorProcessor> monitor_control() const { return _monitor_control; }
280  std::shared_ptr<Send> internal_send_for (std::shared_ptr<const Route> target) const;
285  std::shared_ptr<CapturingProcessor> add_export_point(/* Add some argument for placement later */);
286 
291  ProcessorStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {}
292 
293  uint32_t index;
295  };
296 
297  int add_processor (std::shared_ptr<Processor>, Placement placement, ProcessorStreams* err = 0, bool activation_allowed = true);
298  int add_processor_by_index (std::shared_ptr<Processor>, int, ProcessorStreams* err = 0, bool activation_allowed = true);
299  int add_processor (std::shared_ptr<Processor>, std::shared_ptr<Processor>, ProcessorStreams* err = 0, bool activation_allowed = true);
300  int add_processors (const ProcessorList&, std::shared_ptr<Processor>, ProcessorStreams* err = 0);
301  std::shared_ptr<Processor> before_processor_for_placement (Placement);
302  std::shared_ptr<Processor> before_processor_for_index (int);
311  int remove_processor (std::shared_ptr<Processor> proc, ProcessorStreams* err = 0, bool need_process_lock = true);
319  int replace_processor (std::shared_ptr<Processor> old, std::shared_ptr<Processor> sub, ProcessorStreams* err = 0);
321  int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0);
326  void ab_plugins (bool forward);
329  void move_instrument_down (bool postfader = false);
330 
331  bool strict_io () const { return _strict_io; }
332  bool set_strict_io (bool);
343  bool reset_plugin_insert (std::shared_ptr<Processor> proc);
351  bool customize_plugin_insert (std::shared_ptr<Processor> proc, uint32_t count, ChanCount outs, ChanCount sinks);
352  bool add_remove_sidechain (std::shared_ptr<Processor> proc, bool);
353  bool plugin_preset_output (std::shared_ptr<Processor> proc, ChanCount outs);
354 
355  /* enable sidechain input for a given processor
356  *
357  * The sidechain itself is an IO port object with variable number of channels and configured independently.
358  * Adding/removing the port itself however requires reconfiguring the route and is hence
359  * not a plugin operation itself.
360  *
361  * @param proc the processor to add sidechain inputs to
362  * @returns true on success
363  */
364  bool add_sidechain (std::shared_ptr<Processor> proc) { return add_remove_sidechain (proc, true); }
365  /* remove sidechain input from given processor
366  * @param proc the processor to remove the sidechain input from
367  * @returns true on success
368  */
369  bool remove_sidechain (std::shared_ptr<Processor> proc) { return add_remove_sidechain (proc, false); }
370 
371  samplecnt_t update_signal_latency (bool apply_to_delayline = false, bool* delayline_update_needed = NULL);
373 
375  void set_public_port_latencies (samplecnt_t, bool playback, bool with_latcomp) const;
376 
377  samplecnt_t signal_latency() const { return _signal_latency; }
378  samplecnt_t playback_latency (bool incl_downstream = false) const;
379 
383 
384  bool is_track();
385 
392  int64_t track_number() const { return _track_number; }
393 
394  void set_track_number(int64_t tn) {
395  if (tn == _track_number) { return; }
396  _track_number = tn;
397  track_number_changed();
398  PropertyChanged (ARDOUR::Properties::name);
399  }
400 
402  None = 0x0,
403  CanReplace = 0x1,
404  MultiOut = 0x2,
405  };
406 
408  static PBD::Signal<int(std::shared_ptr<Route>, std::shared_ptr<PluginInsert>, PluginSetupOptions )> PluginSetup;
409 
411  static PBD::Signal<void(std::weak_ptr<Route> )> FanOut;
412 
422 
425 
426  /* stateful */
427  XMLNode& get_state() const;
429  virtual int set_state (const XMLNode&, int version);
430 
432  void set_processor_state (const XMLNode&, int version);
433  virtual bool set_processor_state (XMLNode const & node, int version, XMLProperty const* prop, ProcessorList& new_order, bool& must_configure);
434 
435  std::weak_ptr<Route> weakroute ();
436 
437  int save_as_template (const std::string& path, const std::string& name, const std::string& description );
438 
440 
441  int add_aux_send (std::shared_ptr<Route>, std::shared_ptr<Processor>);
442  int add_foldback_send (std::shared_ptr<Route>, bool post_fader);
445 
451  bool direct_feeds_according_to_reality (std::shared_ptr<GraphNode>, bool* via_send_only = 0);
452 
453  std::string graph_node_name () const {
454  return name ();
455  }
456 
462  bool direct_feeds_according_to_graph (std::shared_ptr<Route>, bool* via_send_only = 0);
463 
468  bool feeds (std::shared_ptr<Route>);
469 
474  std::set<std::shared_ptr<Route>> signal_sources (bool via_sends_only = false);
475 
480 
481  /* Controls (not all directly owned by the Route) */
482 
483  std::shared_ptr<AutomationControl> get_control (const Evoral::Parameter& param);
484 
485  std::shared_ptr<SoloControl> solo_control() const {
486  return _solo_control;
487  }
488 
489  std::shared_ptr<MuteControl> mute_control() const {
490  return _mute_control;
491  }
492 
493  bool can_be_muted_by_others () const { return can_solo(); }
494  bool muted () const { return _mute_control->muted(); }
495  bool muted_by_masters () const { return _mute_control->muted_by_masters(); }
496  bool muted_by_self () const { return _mute_control->muted_by_self(); }
497  bool muted_by_others_soloing () const;
498 
499  std::shared_ptr<SoloIsolateControl> solo_isolate_control() const {
500  return _solo_isolate_control;
501  }
502 
503  std::shared_ptr<SoloSafeControl> solo_safe_control() const {
504  return _solo_safe_control;
505  }
506 
507  /* Route doesn't own these items, but sub-objects that it does own have them
508  and to make UI code a bit simpler, we provide direct access to them
509  here.
510  */
511 
512  std::shared_ptr<Panner> panner() const; /* may return null */
513  std::shared_ptr<PannerShell> panner_shell() const;
514  std::shared_ptr<Pannable> pannable() const;
515 
516  std::shared_ptr<GainControl> gain_control() const;
517  std::shared_ptr<GainControl> trim_control() const;
518  std::shared_ptr<GainControl> volume_control() const;
519  std::shared_ptr<PhaseControl> phase_control() const;
520 
522 
523  bool volume_applies_to_output () const {
524  return _volume_applies_to_output;
525  }
526 
534  std::shared_ptr<Processor> the_instrument() const;
535  InstrumentInfo& instrument_info() { return _instrument_info; }
536  bool instrument_fanned_out () const { return _instrument_fanned_out;}
537 
538 
539  /* "well-known" controls.
540  * Any or all of these may return NULL.
541  */
542 
543  std::shared_ptr<AutomationControl> pan_azimuth_control() const;
544  std::shared_ptr<AutomationControl> pan_elevation_control() const;
545  std::shared_ptr<AutomationControl> pan_width_control() const;
546  std::shared_ptr<AutomationControl> pan_frontback_control() const;
547  std::shared_ptr<AutomationControl> pan_lfe_control() const;
548 
549  uint32_t eq_band_cnt () const;
550  std::string eq_band_name (uint32_t) const;
551 
552  std::shared_ptr<AutomationControl> mapped_control (enum WellKnownCtrl, uint32_t band = 0) const;
553  std::shared_ptr<ReadOnlyControl> mapped_output (enum WellKnownData) const;
554 
555  std::shared_ptr<AutomationControl> send_level_controllable (uint32_t n, bool locked = false) const;
556  std::shared_ptr<AutomationControl> send_enable_controllable (uint32_t n) const;
557  std::shared_ptr<AutomationControl> send_pan_azimuth_controllable (uint32_t n) const;
558  std::shared_ptr<AutomationControl> send_pan_azimuth_enable_controllable (uint32_t n) const;
559 
560  std::string send_name (uint32_t n) const;
561 
562  std::shared_ptr<AutomationControl> master_send_enable_controllable () const;
563 
565 
567 
568  /* can only be executed by a route for which is_monitor() is true
569  * (i.e. the monitor out)
570  */
571  void monitor_run (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes);
572 
573  bool slaved_to (std::shared_ptr<VCA>) const;
574  bool slaved () const;
575 
576  virtual void use_captured_sources (SourceList& srcs, CaptureInfos const &) {}
577 
578 
579 protected:
580  friend class Session;
581 
582  void process ();
583 
585  void set_listen (bool);
586 
587  virtual void set_block_size (pframes_t nframes);
588 
589  virtual int no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing);
590 
591  virtual void snapshot_out_of_band_data (samplecnt_t /* nframes */) {}
592  virtual void write_out_of_band_data (BufferSet&, samplecnt_t /* nframes */) const {}
593  virtual void update_controls (BufferSet const&) {}
594 
596  samplepos_t start_sample, samplepos_t end_sample,
597  pframes_t nframes,
598  bool gain_automation_ok,
599  bool run_disk_processors);
600 
602 
603  virtual void bounce_process (BufferSet& bufs,
604  samplepos_t start_sample, samplecnt_t nframes,
605  std::shared_ptr<Processor> endpoint, bool include_endpoint,
606  bool for_export, bool for_freeze);
607 
608  samplecnt_t bounce_get_latency (std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) const;
609  ChanCount bounce_get_output_streams (ChanCount &cc, std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) const;
610 
611  bool can_freeze_processor (std::shared_ptr<Processor>, bool allow_routing = false) const;
612 
613  bool _active;
616 
618  mutable Glib::Threads::RWLock _processor_lock;
619 
620  std::shared_ptr<IO> _input;
621  std::shared_ptr<IO> _output;
622 
623  std::shared_ptr<Delivery> _main_outs;
624  std::shared_ptr<InternalSend> _monitor_send;
625  std::shared_ptr<InternalReturn> _intreturn;
626  std::shared_ptr<MonitorProcessor> _monitor_control;
627  std::shared_ptr<Pannable> _pannable;
628  std::shared_ptr<DiskReader> _disk_reader;
629  std::shared_ptr<DiskWriter> _disk_writer;
630 #ifdef HAVE_BEATBOX
631  std::shared_ptr<BeatBox> _beatbox;
632 #endif
633  std::shared_ptr<MonitorControl> _monitoring_control;
634  std::shared_ptr<SurroundSend> _surround_send;
635  std::shared_ptr<SurroundReturn> _surround_return;
636 
638 
639  enum {
640  EmitNone = 0x00,
641  EmitMeterChanged = 0x01,
642  EmitMeterVisibilityChange = 0x02,
643  EmitRtProcessorChange = 0x04,
644  EmitSendReturnChange = 0x08
645  };
646 
648  std::atomic<int> _pending_process_reorder;
649  std::atomic<int> _pending_listen_change;
650  std::atomic<int> _pending_surround_send;
651  std::atomic<int> _pending_signals;
652 
655 
657 
658  bool _recordable : 1;
659 
660  std::shared_ptr<SoloControl> _solo_control;
661  std::shared_ptr<MuteControl> _mute_control;
662  std::shared_ptr<SoloIsolateControl> _solo_isolate_control;
663  std::shared_ptr<SoloSafeControl> _solo_safe_control;
664 
665  std::string _comment;
668 
672 
673  virtual ChanCount input_streams () const;
674 
675  virtual XMLNode& state (bool save_template) const;
676 
678 
680 
683 
684  uint32_t pans_required() const;
686 
687  std::shared_ptr<GainControl> _gain_control;
688  std::shared_ptr<GainControl> _trim_control;
689  std::shared_ptr<GainControl> _volume_control;
690  std::shared_ptr<PhaseControl> _phase_control;
691  std::shared_ptr<Amp> _amp;
692  std::shared_ptr<Amp> _trim;
693  std::shared_ptr<Amp> _volume;
694  std::shared_ptr<PeakMeter> _meter;
695  std::shared_ptr<PolarityProcessor> _polarity;
696  std::shared_ptr<TriggerBox> _triggerbox;
697 
699 
700  std::shared_ptr<DelayLine> _delayline;
701 
702  bool is_internal_processor (std::shared_ptr<Processor>) const;
703 
704  std::shared_ptr<Processor> the_instrument_unlocked() const;
705 
707 
708 private:
709  /* no copy construction */
710  Route (Route const &);
711 
712  int set_state_2X (const XMLNode&, int);
713  void set_processor_state_2X (XMLNodeList const &, int);
714 
715  void input_change_handler (IOChange, void *src);
716  void output_change_handler (IOChange, void *src);
718 
719  void processor_selfdestruct (std::weak_ptr<Processor>);
720  std::vector<std::weak_ptr<Processor> > selfdestruct_sequence;
721  Glib::Threads::Mutex selfdestruct_lock;
722 
725 
727  mutable std::map<Route*, bool> _connection_cache;
728 
729  int configure_processors_unlocked (ProcessorStreams*, Glib::Threads::RWLock::WriterLock*);
731  void apply_processor_order (const ProcessorList& new_order);
732 
733  std::list<std::pair<ChanCount, ChanCount> > try_configure_processors (ChanCount, ProcessorStreams *);
734  std::list<std::pair<ChanCount, ChanCount> > try_configure_processors_unlocked (ChanCount, ProcessorStreams *);
735 
736  bool add_processor_from_xml_2X (const XMLNode&, int);
737 
738  void placement_range (Placement p, ProcessorList::iterator& start, ProcessorList::iterator& end);
739 
740  void set_self_solo (bool yn);
741  void unpan ();
742 
744  samplecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, samplecnt_t) const;
745 
747 
748  pframes_t latency_preroll (pframes_t nframes, samplepos_t& start_sample, samplepos_t& end_sample);
749 
750  void run_route (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, bool gain_automation_ok, bool run_disk_reader);
751  void fill_buffers_with_input (BufferSet& bufs, std::shared_ptr<IO> io, pframes_t nframes);
752 
756 
757  void set_plugin_state_dir (std::weak_ptr<Processor>, const std::string&);
758 
763  public:
765  : _route (r)
766  , _processors (r->_processors)
767  , _processor_max_streams (r->processor_max_streams)
768  { }
769 
770  void restore () {
771  _route->_processors = _processors;
772  _route->processor_max_streams = _processor_max_streams;
773  }
774 
775  private:
776  /* this should perhaps be a shared_ptr, but ProcessorStates will
777  not hang around long enough for it to matter.
778  */
782  };
783 
784  friend class ProcessorState;
785 
786  std::shared_ptr<CapturingProcessor> _capturing_processor;
787 
788  int64_t _track_number;
794 
795  void add_well_known_ctrl (WellKnownCtrl, std::shared_ptr<PluginInsert>, int param);
797 
798  std::map<WellKnownCtrl, std::vector<std::weak_ptr<AutomationControl>>> _well_known_map;
799 
805  std::weak_ptr<Processor> _processor_after_last_custom_meter;
806 
809 };
810 
811 } // namespace ARDOUR
812 
void None
Definition: TypeList.h:49
ProcessorList _processors
Definition: route.h:780
ChanCount _processor_max_streams
Definition: route.h:781
std::shared_ptr< AutomationControl > send_level_controllable(uint32_t n, bool locked=false) const
static PBD::Signal< void(std::weak_ptr< Route >)> FanOut
Definition: route.h:411
bool reset_plugin_insert(std::shared_ptr< Processor > proc)
static PBD::Signal< int(std::shared_ptr< Route >, std::shared_ptr< PluginInsert >, PluginSetupOptions)> PluginSetup
Definition: route.h:408
void sidechain_change_handler(IOChange, void *src)
std::shared_ptr< AutomationControl > pan_lfe_control() const
void add_well_known_ctrl(WellKnownCtrl)
int set_state_2X(const XMLNode &, int)
std::shared_ptr< CapturingProcessor > _capturing_processor
Definition: route.h:786
std::shared_ptr< IO > _input
Definition: route.h:620
bool can_solo() const
Definition: route.h:188
int replace_processor(std::shared_ptr< Processor > old, std::shared_ptr< Processor > sub, ProcessorStreams *err=0)
PBD::Signal< void()> io_changed
Definition: route.h:424
void clear_processors(Placement)
std::shared_ptr< MonitorControl > monitoring_control() const
Definition: route.h:144
void process_output_buffers(BufferSet &bufs, samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, bool gain_automation_ok, bool run_disk_processors)
std::shared_ptr< IO > input() const
Definition: route.h:125
bool output_port_count_changing(ChanCount)
void shift(timepos_t const &, timecnt_t const &)
void push_solo_upstream(int32_t delta)
std::map< Route *, bool > _connection_cache
Definition: route.h:727
void flush_processors()
bool add_sidechain(std::shared_ptr< Processor > proc)
Definition: route.h:364
bool _volume_applies_to_output
Definition: route.h:698
std::list< std::string > unknown_processors() const
XMLNode & get_processor_state()
int remove_processor(std::shared_ptr< Processor > proc, ProcessorStreams *err=0, bool need_process_lock=true)
virtual void write_out_of_band_data(BufferSet &, samplecnt_t) const
Definition: route.h:592
samplecnt_t playback_latency(bool incl_downstream=false) const
PBD::Signal< void()> track_number_changed
Definition: route.h:391
void reset_instrument_info()
void set_pingmgr_proxy(RoutePinWindowProxy *wp)
Definition: route.h:260
void set_processor_state(const XMLNode &, int version)
void move_instrument_down(bool postfader=false)
int remove_processors(const ProcessorList &, ProcessorStreams *err=0)
samplecnt_t update_signal_latency(bool apply_to_delayline=false, bool *delayline_update_needed=NULL)
bool processors_reorder_needs_configure(const ProcessorList &new_order)
std::shared_ptr< TriggerBox > triggerbox() const
Definition: route.h:227
bool muted_by_others_soloing() const
std::string _comment
Definition: route.h:665
std::shared_ptr< InternalSend > _monitor_send
Definition: route.h:624
virtual bool set_processor_state(XMLNode const &node, int version, XMLProperty const *prop, ProcessorList &new_order, bool &must_configure)
ChanCount n_inputs() const
Definition: route.h:130
std::shared_ptr< Amp > _trim
Definition: route.h:692
bool can_monitor() const
Definition: route.h:194
std::shared_ptr< MonitorControl > _monitoring_control
Definition: route.h:633
std::string comment()
Definition: route.h:138
void set_disk_io_point(DiskIOPoint)
int add_processor_by_index(std::shared_ptr< Processor >, int, ProcessorStreams *err=0, bool activation_allowed=true)
PBD::Signal< void()> processor_latency_changed
Definition: route.h:419
std::shared_ptr< SoloControl > _solo_control
Definition: route.h:660
std::shared_ptr< SoloSafeControl > solo_safe_control() const
Definition: route.h:503
std::shared_ptr< AutomationControl > pan_width_control() const
void remove_send_from_internal_return(InternalSend *)
void add_send_to_internal_return(InternalSend *)
bool instrument_fanned_out() const
Definition: route.h:536
bool _strict_io
Definition: route.h:789
void set_listen(bool)
SlavableAutomationControlList slavables() const
std::weak_ptr< Route > weakroute()
void maybe_note_meter_position()
virtual void non_realtime_locate(samplepos_t)
virtual bool declick_in_progress() const
Definition: route.h:161
std::shared_ptr< AutomationControl > pan_elevation_control() const
int64_t track_number() const
Definition: route.h:392
bool _recordable
Definition: route.h:658
std::shared_ptr< GainControl > volume_control() const
PBD::Signal< void()> denormal_protection_changed
Definition: route.h:381
bool set_meter_point_unlocked()
bool has_io_processor_named(const std::string &)
ChanCount n_process_buffers()
void set_denormal_protection(bool yn)
std::atomic< int > _pending_listen_change
Definition: route.h:649
ChanCount processor_out_streams
Definition: route.h:682
std::string eq_band_name(uint32_t) const
std::shared_ptr< InternalReturn > internal_return() const
Definition: route.h:278
std::shared_ptr< PolarityProcessor > polarity() const
Definition: route.h:223
samplecnt_t set_private_port_latencies(bool playback) const
InstrumentInfo _instrument_info
Definition: route.h:669
bool muted() const
Definition: route.h:494
samplecnt_t update_port_latencies(PortSet &ports, PortSet &feeders, bool playback, samplecnt_t) const
samplecnt_t _output_latency
Definition: route.h:615
bool can_be_muted_by_others() const
Definition: route.h:493
virtual XMLNode & state(bool save_template) const
int64_t _track_number
Definition: route.h:788
void disable_plugins(Placement)
std::shared_ptr< MuteControl > _mute_control
Definition: route.h:661
std::shared_ptr< Processor > the_instrument_unlocked() const
std::shared_ptr< PeakMeter > _meter
Definition: route.h:694
bool _instrument_fanned_out
Definition: route.h:670
int add_processors(const ProcessorList &, std::shared_ptr< Processor >, ProcessorStreams *err=0)
void enable_surround_send()
std::shared_ptr< SurroundSend > _surround_send
Definition: route.h:634
std::shared_ptr< SoloIsolateControl > solo_isolate_control() const
Definition: route.h:499
void disable_plugins()
void listen_position_changed()
ChanCount max_processor_streams() const
Definition: route.h:255
pframes_t latency_preroll(pframes_t nframes, samplepos_t &start_sample, samplepos_t &end_sample)
void all_visible_processors_active(bool)
DataType _default_type
Definition: route.h:667
bool _have_internal_generator
Definition: route.h:666
bool _active
Definition: route.h:613
std::shared_ptr< Processor > nth_processor(uint32_t n)
Definition: route.h:238
std::vector< std::weak_ptr< Processor > > selfdestruct_sequence
Definition: route.h:720
bool _custom_meter_position_noted
Definition: route.h:801
std::atomic< int > _pending_process_reorder
Definition: route.h:648
void non_realtime_transport_stop(samplepos_t now, bool flush)
void processor_selfdestruct(std::weak_ptr< Processor >)
std::weak_ptr< Processor > _processor_after_last_custom_meter
Definition: route.h:805
void automatables(PBD::ControllableSet &) const
virtual int no_roll_unlocked(pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing)
void add_internal_return()
int save_as_template(const std::string &path, const std::string &name, const std::string &description)
int roll(pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool &need_butler)
bool direct_feeds_according_to_reality(std::shared_ptr< GraphNode >, bool *via_send_only=0)
IOVector all_inputs() const
std::shared_ptr< MonitorProcessor > _monitor_control
Definition: route.h:626
ProcessorList _pending_processor_order
Definition: route.h:647
void setup_invisible_processors()
std::shared_ptr< Pannable > _pannable
Definition: route.h:627
std::shared_ptr< Processor > before_processor_for_placement(Placement)
std::shared_ptr< IO > output() const
Definition: route.h:126
std::atomic< int > _pending_signals
Definition: route.h:651
std::shared_ptr< AutomationControl > automation_control_recurse(PBD::ID const &id) const
void run_route(samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, bool gain_automation_ok, bool run_disk_reader)
void ab_plugins(bool forward)
std::shared_ptr< GainControl > trim_control() const
bool volume_applies_to_output() const
Definition: route.h:523
int reorder_processors(const ProcessorList &new_order, ProcessorStreams *err=0)
void emit_pending_signals()
std::shared_ptr< SoloIsolateControl > _solo_isolate_control
Definition: route.h:662
DataType data_type() const
Definition: route.h:118
virtual void bounce_process(BufferSet &bufs, samplepos_t start_sample, samplecnt_t nframes, std::shared_ptr< Processor > endpoint, bool include_endpoint, bool for_export, bool for_freeze)
void flush_processor_buffers_locked(samplecnt_t nframes)
std::shared_ptr< PannerShell > panner_shell() const
std::shared_ptr< PolarityProcessor > _polarity
Definition: route.h:695
void set_active(bool yn, void *)
void input_change_handler(IOChange, void *src)
bool customize_plugin_insert(std::shared_ptr< Processor > proc, uint32_t count, ChanCount outs, ChanCount sinks)
PBD::Signal< void()> comment_changed
Definition: route.h:382
std::shared_ptr< AutomationControl > send_pan_azimuth_controllable(uint32_t n) const
void queue_surround_processors_changed()
Definition: route.h:269
std::shared_ptr< MonitorProcessor > monitor_control() const
Definition: route.h:279
samplecnt_t _signal_latency
Definition: route.h:614
Route(Route const &)
std::shared_ptr< AutomationControl > send_pan_azimuth_enable_controllable(uint32_t n) const
bool _initial_io_setup
Definition: route.h:791
std::shared_ptr< AutomationControl > send_enable_controllable(uint32_t n) const
PluginSetupOptions
Definition: route.h:401
virtual ChanCount input_streams() const
std::list< std::pair< ChanCount, ChanCount > > try_configure_processors_unlocked(ChanCount, ProcessorStreams *)
void set_meter_type(MeterType t)
bool denormal_protection() const
XMLNode & get_template()
std::shared_ptr< Processor > nth_send(uint32_t n) const
MonitorState monitoring_state() const
int add_foldback_send(std::shared_ptr< Route >, bool post_fader)
std::shared_ptr< AutomationControl > master_send_enable_controllable() const
bool soloed() const
Definition: route.h:184
std::shared_ptr< SurroundReturn > surround_return() const
Definition: route.h:146
InstrumentInfo & instrument_info()
Definition: route.h:535
int configure_processors(ProcessorStreams *)
std::shared_ptr< Pannable > pannable() const
void apply_latency_compensation()
virtual MonitorState get_input_monitoring_state(bool recording, bool talkback) const
Definition: route.h:149
void enable_monitor_send()
std::list< std::shared_ptr< Processor > > ProcessorList
Definition: route.h:111
std::shared_ptr< MuteControl > mute_control() const
Definition: route.h:489
bool direct_feeds_according_to_graph(std::shared_ptr< Route >, bool *via_send_only=0)
std::shared_ptr< SoloControl > solo_control() const
Definition: route.h:485
gain_t _monitor_gain
Definition: route.h:793
MeterPoint meter_point() const
Definition: route.h:206
std::shared_ptr< IO > _output
Definition: route.h:621
void update_send_delaylines()
virtual void filter_input(BufferSet &)
Definition: route.h:153
bool strict_io() const
Definition: route.h:331
std::list< std::pair< ChanCount, ChanCount > > try_configure_processors(ChanCount, ProcessorStreams *)
std::shared_ptr< AutomationControl > get_control(const Evoral::Parameter &param)
virtual void update_controls(BufferSet const &)
Definition: route.h:593
void set_volume_applies_to_output(bool)
void silence_unlocked(pframes_t)
std::string send_name(uint32_t n) const
std::shared_ptr< DelayLine > _delayline
Definition: route.h:700
void apply_processor_order(const ProcessorList &new_order)
std::shared_ptr< PhaseControl > _phase_control
Definition: route.h:690
void set_meter_point(MeterPoint)
void set_loop(ARDOUR::Location *)
IOVector all_outputs() const
ChanCount processor_max_streams
Definition: route.h:681
void push_solo_isolate_upstream(int32_t delta)
std::shared_ptr< GainControl > _gain_control
Definition: route.h:687
std::map< WellKnownCtrl, std::vector< std::weak_ptr< AutomationControl > > > _well_known_map
Definition: route.h:798
virtual bool can_record()
Definition: route.h:162
std::shared_ptr< InternalReturn > _intreturn
Definition: route.h:625
uint32_t eq_band_cnt() const
bool active() const
Definition: route.h:133
void remove_monitor_send()
int add_processor(std::shared_ptr< Processor >, Placement placement, ProcessorStreams *err=0, bool activation_allowed=true)
void disable_processors(Placement)
void set_processor_state_2X(XMLNodeList const &, int)
virtual void set_block_size(pframes_t nframes)
std::shared_ptr< SurroundSend > surround_send() const
Definition: route.h:145
virtual void snapshot_out_of_band_data(samplecnt_t)
Definition: route.h:591
void set_patch_selector_dialog(PatchChangeGridDialog *d)
Definition: route.h:263
void set_comment(std::string str, void *src)
PBD::Signal< void(RouteProcessorChange)> processors_changed
Definition: route.h:414
std::shared_ptr< const PeakMeter > peak_meter() const
Definition: route.h:225
std::shared_ptr< Send > internal_send_for(std::shared_ptr< const Route > target) const
bool muted_by_self() const
Definition: route.h:496
void set_plugin_state_dir(std::weak_ptr< Processor >, const std::string &)
MeterPoint _meter_point
Definition: route.h:653
Route(Session &, std::string name, PresentationInfo::Flag flags=PresentationInfo::Flag(0), DataType default_type=DataType::AUDIO)
std::shared_ptr< SurroundReturn > _surround_return
Definition: route.h:635
std::shared_ptr< GainControl > _volume_control
Definition: route.h:689
void disable_processors()
bool add_processor_from_xml_2X(const XMLNode &, int)
Glib::Threads::RWLock _processor_lock
Definition: route.h:618
PBD::Signal< void()> meter_change
Definition: route.h:421
RoutePinWindowProxy * _pinmgr_proxy
Definition: route.h:807
std::shared_ptr< AutomationControl > pan_azimuth_control() const
bool feeds(std::shared_ptr< Route >)
std::shared_ptr< Delivery > _main_outs
Definition: route.h:623
void monitor_run(samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes)
std::shared_ptr< GainControl > gain_control() const
bool set_strict_io(bool)
PatchChangeGridDialog * _patch_selector_dialog
Definition: route.h:808
void cut_copy_section(timepos_t const &start, timepos_t const &end, timepos_t const &to, SectionOperation const op)
bool remove_sidechain(std::shared_ptr< Processor > proc)
Definition: route.h:369
Location * _loop_location
Definition: route.h:671
std::shared_ptr< Amp > trim() const
Definition: route.h:222
void fill_buffers_with_input(BufferSet &bufs, std::shared_ptr< IO > io, pframes_t nframes)
void set_track_number(int64_t tn)
Definition: route.h:394
std::shared_ptr< Panner > panner() const
void clear_all_solo_state()
virtual int set_state(const XMLNode &, int version)
void output_change_handler(IOChange, void *src)
ChanCount n_outputs() const
Definition: route.h:131
std::shared_ptr< Processor > nth_plugin(uint32_t n) const
virtual void realtime_locate(bool)
Definition: route.h:167
DiskIOPoint disk_io_point() const
Definition: route.h:214
static void set_name_in_state(XMLNode &, const std::string &)
std::shared_ptr< Processor > the_instrument() const
bool slaved_to(std::shared_ptr< VCA >) const
samplecnt_t bounce_get_latency(std::shared_ptr< Processor > endpoint, bool include_endpoint, bool for_export, bool for_freeze) const
void set_processor_positions()
virtual void realtime_handle_transport_stopped()
void catch_up_on_solo_mute_override()
XMLNode & get_state() const
bool is_internal_processor(std::shared_ptr< Processor >) const
void tempo_map_changed()
virtual void use_captured_sources(SourceList &srcs, CaptureInfos const &)
Definition: route.h:576
samplecnt_t signal_latency() const
Definition: route.h:377
void protect_automation()
std::shared_ptr< SoloSafeControl > _solo_safe_control
Definition: route.h:663
bool _in_sidechain_setup
Definition: route.h:792
std::shared_ptr< DiskWriter > _disk_writer
Definition: route.h:629
MeterPoint _pending_meter_point
Definition: route.h:654
std::atomic< int > _pending_surround_send
Definition: route.h:650
bool _in_configure_processors
Definition: route.h:790
Glib::Threads::Mutex selfdestruct_lock
Definition: route.h:721
std::shared_ptr< CapturingProcessor > add_export_point()
bool soloed_by_others_downstream() const
Definition: route.h:182
int silence(pframes_t)
std::set< std::shared_ptr< Route > > signal_sources(bool via_sends_only=false)
bool slaved() const
RoutePinWindowProxy * pinmgr_proxy() const
Definition: route.h:259
std::shared_ptr< Amp > _amp
Definition: route.h:691
std::shared_ptr< Amp > amp() const
Definition: route.h:221
bool soloed_by_others_upstream() const
Definition: route.h:181
bool can_freeze_processor(std::shared_ptr< Processor >, bool allow_routing=false) const
ChanCount bounce_get_output_streams(ChanCount &cc, std::shared_ptr< Processor > endpoint, bool include_endpoint, bool for_export, bool for_freeze) const
std::shared_ptr< Processor > processor_by_id(PBD::ID) const
bool output_effectively_connected() const
std::shared_ptr< DiskReader > _disk_reader
Definition: route.h:628
std::shared_ptr< ReadOnlyControl > mapped_output(enum WellKnownData) const
bool plugin_preset_output(std::shared_ptr< Processor > proc, ChanCount outs)
void add_well_known_ctrl(WellKnownCtrl, std::shared_ptr< PluginInsert >, int param)
bool apply_processor_changes_rt()
std::shared_ptr< InternalSend > monitor_send() const
Definition: route.h:275
bool is_safe() const
Definition: route.h:191
int add_processor(std::shared_ptr< Processor >, std::shared_ptr< Processor >, ProcessorStreams *err=0, bool activation_allowed=true)
int add_aux_send(std::shared_ptr< Route >, std::shared_ptr< Processor >)
uint32_t pans_required() const
void set_self_solo(bool yn)
std::shared_ptr< Amp > _volume
Definition: route.h:693
void foreach_processor(std::function< void(std::weak_ptr< Processor >)> method) const
Definition: route.h:231
std::shared_ptr< PhaseControl > phase_control() const
std::shared_ptr< Delivery > main_outs() const
Definition: route.h:277
bool has_external_redirects() const
bool input_port_count_changing(ChanCount)
PatchChangeGridDialog * patch_selector_dialog() const
Definition: route.h:262
std::shared_ptr< PeakMeter > peak_meter()
Definition: route.h:224
bool output_effectively_connected_real() const
int no_roll(pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing)
void placement_range(Placement p, ProcessorList::iterator &start, ProcessorList::iterator &end)
void stop_triggers(bool now)
void solo_control_changed(bool self, PBD::Controllable::GroupControlDisposition)
bool soloed_by_others() const
Definition: route.h:180
std::shared_ptr< GainControl > _trim_control
Definition: route.h:688
bool set_name(const std::string &str)
void set_public_port_latencies(samplecnt_t, bool playback, bool with_latcomp) const
bool self_soloed() const
Definition: route.h:183
int configure_processors_unlocked(ProcessorStreams *, Glib::Threads::RWLock::WriterLock *)
ProcessorList _processors
Definition: route.h:617
bool add_remove_sidechain(std::shared_ptr< Processor > proc, bool)
std::string ensure_track_or_route_name(std::string) const
PBD::Signal< void(void *)> record_enable_changed
Definition: route.h:415
bool _denormal_protection
Definition: route.h:656
virtual ~Route()
DiskIOPoint _disk_io_point
Definition: route.h:637
std::shared_ptr< PeakMeter > shared_peak_meter() const
Definition: route.h:226
std::shared_ptr< AutomationControl > pan_frontback_control() const
MeterType meter_type() const
void remove_surround_send()
std::shared_ptr< Processor > before_processor_for_index(int)
PBD::Signal< void()> active_changed
Definition: route.h:380
std::shared_ptr< AutomationControl > mapped_control(enum WellKnownCtrl, uint32_t band=0) const
virtual int init()
PBD::Signal< void(void *)> SelectedChanged
Definition: route.h:439
std::shared_ptr< TriggerBox > _triggerbox
Definition: route.h:696
std::string graph_node_name() const
Definition: route.h:453
bool muted_by_masters() const
Definition: route.h:495
Definition: id.h:34
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
PBD::PropertyDescriptor< std::string > name
PBD::PropertyDescriptor< timepos_t > start
PBD::PropertyDescriptor< bool > locked
uint32_t pframes_t
std::vector< std::shared_ptr< Source > > SourceList
Temporal::samplecnt_t samplecnt_t
std::vector< CaptureInfo * > CaptureInfos
std::list< std::shared_ptr< SlavableAutomationControl > > SlavableAutomationControlList
Temporal::samplepos_t samplepos_t
void flush()
DebugBits VCA
std::set< std::shared_ptr< Controllable > > ControllableSet
Definition: controllable.h:40
ProcessorStreams(size_t i=0, ChanCount c=ChanCount())
Definition: route.h:291
uint32_t index
Index of processor where configuration failed.
Definition: route.h:293
ChanCount count
Input requested of processor.
Definition: route.h:294
std::vector< XMLNode * > XMLNodeList
Definition: xml++.h:66