Ardour  9.2-541-gc1841a13dd
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 "pbd/fastlog.h"
36 #include "pbd/xml++.h"
37 #include "pbd/undo.h"
38 #include "pbd/mutex.h"
39 #include "pbd/stateful.h"
40 #include "pbd/controllable.h"
41 #include "pbd/destructible.h"
42 #include "pbd/rwlock.h"
43 
44 #include "temporal/domain_swap.h"
45 #include "temporal/types.h"
46 
47 #include "ardour/ardour.h"
48 #include "ardour/gain_control.h"
49 #include "ardour/instrument_info.h"
50 #include "ardour/io.h"
51 #include "ardour/io_vector.h"
53 #include "ardour/types.h"
54 #include "ardour/monitorable.h"
55 #include "ardour/muteable.h"
56 #include "ardour/mute_master.h"
57 #include "ardour/mute_control.h"
59 #include "ardour/stripable.h"
60 #include "ardour/graphnode.h"
61 #include "ardour/automatable.h"
63 #include "ardour/scale_provider.h"
64 #include "ardour/soloable.h"
65 #include "ardour/solo_control.h"
67 #include "ardour/slavable.h"
68 
71 class RouteCommentEditor;
72 
73 namespace ARDOUR {
74 
75 class Amp;
76 class BeatBox;
77 class DelayLine;
78 class Delivery;
79 class DiskReader;
80 class DiskWriter;
81 class IOProcessor;
82 class Panner;
83 class PannerShell;
84 class PolarityProcessor;
85 class PortSet;
86 class Processor;
87 class PluginInsert;
88 class RouteGroup;
89 class Send;
90 class InternalReturn;
91 class Location;
92 class MonitorControl;
93 class MonitorProcessor;
94 class Pannable;
95 class CapturingProcessor;
96 class InternalSend;
97 class VCA;
98 class SoloIsolateControl;
99 class PhaseControl;
100 class MonitorControl;
101 class TriggerBox;
102 class SurroundReturn;
103 class SurroundSend;
104 
106  public GraphNode,
107  public Soloable,
108  public Muteable,
109  public Monitorable,
110  public RouteGroupMember,
111  public ScaleProvider
112 {
113 public:
114 
115  typedef std::list<std::shared_ptr<Processor> > ProcessorList;
116 
118  virtual ~Route();
119 
120  virtual int init ();
121 
122  DataType data_type () const {
123  /* XXX ultimately nice to do away with this concept, but it is
124  quite useful for coders and for users too.
125  */
126  return _default_type;
127  }
128 
129  uint32_t color () const;
130 
131  std::shared_ptr<IO> input() const { return _input; }
132  std::shared_ptr<IO> output() const { return _output; }
135 
136  ChanCount n_inputs() const { return _input->n_ports(); }
137  ChanCount n_outputs() const { return _output->n_ports(); }
138 
139  bool active() const { return _active; }
140  void set_active (bool yn, void *);
141 
142  std::string ensure_track_or_route_name (std::string) const;
143 
144  std::string comment() { return _comment; }
145  void set_comment (std::string str, void *src);
146 
147  RouteCommentEditor* comment_editor () const { return _comment_editor_window; }
148  void set_comment_editor (RouteCommentEditor* w) { _comment_editor_window = w; }
149 
150  bool set_name (const std::string& str);
151  static void set_name_in_state (XMLNode &, const std::string &);
152 
153  std::shared_ptr<MonitorControl> monitoring_control() const { return _monitoring_control; }
154  std::shared_ptr<SurroundSend> surround_send() const { return _surround_send; }
155  std::shared_ptr<SurroundReturn> surround_return() const { return _surround_return; }
156 
158  virtual MonitorState get_input_monitoring_state (bool recording, bool talkback) const { return MonitoringSilence; }
159 
160  /* these are the core of the API of a Route. see the protected sections as well */
161 
162  virtual void filter_input (BufferSet &) {}
163 
164  int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
165 
166  int no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing);
167 
169 
170  virtual bool declick_in_progress () const { return false; }
171  virtual bool can_record() { return false; }
172 
175 
176  virtual void realtime_locate (bool) {}
179 
180  /* end of vfunc-based API */
181 
182  void shift (timepos_t const &, timecnt_t const &);
183  void cut_copy_section (timepos_t const& start, timepos_t const& end, timepos_t const& to, SectionOperation const op);
184 
185  /* controls use set_solo() to modify this route's solo state */
186 
188 
189  bool soloed_by_others () const { return _solo_control->soloed_by_others(); }
190  bool soloed_by_others_upstream () const { return _solo_control->soloed_by_others_upstream(); }
191  bool soloed_by_others_downstream () const { return _solo_control->soloed_by_others_downstream(); }
192  bool self_soloed () const { return _solo_control->self_soloed(); }
193  bool soloed () const { return self_soloed () || soloed_by_others (); }
194 
195  void push_solo_upstream (int32_t delta);
196  void push_solo_isolate_upstream (int32_t delta);
197  bool can_solo () const {
198  return !(is_singleton() || is_auditioner() || is_foldbackbus());
199  }
200  bool is_safe () const {
201  return _solo_safe_control->get_value();
202  }
203  bool can_monitor () const {
204  return can_solo() || is_foldbackbus ();
205  }
208 
209  void set_denormal_protection (bool yn);
210  bool denormal_protection() const;
211 
215  MeterPoint meter_point() const { return _pending_meter_point; }
216 
218 
221 
223  DiskIOPoint disk_io_point() const { return _disk_io_point; }
224 
225  void stop_triggers (bool now);
227 
228  /* Processors */
229 
230  std::shared_ptr<Amp> amp() const { return _amp; }
231  std::shared_ptr<Amp> trim() const { return _trim; }
232  std::shared_ptr<PolarityProcessor> polarity() const { return _polarity; }
233  std::shared_ptr<PeakMeter> peak_meter() { return _meter; }
234  std::shared_ptr<const PeakMeter> peak_meter() const { return _meter; }
235  std::shared_ptr<PeakMeter> shared_peak_meter() const { return _meter; }
236  std::shared_ptr<TriggerBox> triggerbox() const { return _triggerbox; }
237 
239 
240  void foreach_processor (std::function<void(std::weak_ptr<Processor>)> method) const {
241  PBD::RWLock::ReaderLock lm (_processor_lock);
242  for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
243  method (std::weak_ptr<Processor> (*i));
244  }
245  }
246 
247  std::shared_ptr<Processor> nth_processor (uint32_t n) {
248  PBD::RWLock::ReaderLock lm (_processor_lock);
249  ProcessorList::iterator i;
250  for (i = _processors.begin(); i != _processors.end() && n; ++i, --n) {}
251  if (i == _processors.end()) {
252  return std::shared_ptr<Processor> ();
253  } else {
254  return *i;
255  }
256  }
257 
258  std::shared_ptr<Processor> processor_by_id (PBD::ID) const;
259  std::shared_ptr<Processor> plugin_by_uri (std::string const&, int offset = 0) const;
260 
261  std::shared_ptr<Processor> nth_plugin (uint32_t n) const;
262  std::shared_ptr<Processor> nth_send (uint32_t n) const;
263 
264  bool has_io_processor_named (const std::string&);
265  ChanCount max_processor_streams () const { return processor_max_streams; }
266 
267  std::list<std::string> unknown_processors () const;
268 
269  RoutePinWindowProxy * pinmgr_proxy () const { return _pinmgr_proxy; }
270  void set_pingmgr_proxy (RoutePinWindowProxy* wp) { _pinmgr_proxy = wp ; }
271 
272  PatchChangeGridDialog* patch_selector_dialog () const { return _patch_selector_dialog; }
273  void set_patch_selector_dialog (PatchChangeGridDialog* d) { _patch_selector_dialog = d; }
274 
275  std::shared_ptr<AutomationControl> automation_control_recurse (PBD::ID const & id) const;
276 
278 
280  _pending_surround_send.store (1);
281  }
282 
283  /* special processors */
284 
285  std::shared_ptr<InternalSend> monitor_send() const { return _monitor_send; }
287  std::shared_ptr<Delivery> main_outs() const { return _main_outs; }
288  std::shared_ptr<InternalReturn> internal_return() const { return _intreturn; }
289  std::shared_ptr<MonitorProcessor> monitor_control() const { return _monitor_control; }
290  std::shared_ptr<Send> internal_send_for (std::shared_ptr<const Route> target) const;
295  std::shared_ptr<CapturingProcessor> add_export_point(/* Add some argument for placement later */);
296 
301  ProcessorStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {}
302 
303  uint32_t index;
305  };
306 
307  int add_processor (std::shared_ptr<Processor>, Placement placement, ProcessorStreams* err = 0, bool activation_allowed = true);
308  int add_processor_by_index (std::shared_ptr<Processor>, int, ProcessorStreams* err = 0, bool activation_allowed = true);
309  int add_processor (std::shared_ptr<Processor>, std::shared_ptr<Processor>, ProcessorStreams* err = 0, bool activation_allowed = true);
310  int add_processors (const ProcessorList&, std::shared_ptr<Processor>, ProcessorStreams* err = 0);
311  std::shared_ptr<Processor> before_processor_for_placement (Placement);
312  std::shared_ptr<Processor> before_processor_for_index (int);
321  int remove_processor (std::shared_ptr<Processor> proc, ProcessorStreams* err = 0, bool need_process_lock = true);
329  int replace_processor (std::shared_ptr<Processor> old, std::shared_ptr<Processor> sub, ProcessorStreams* err = 0);
331  int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0);
336  void ab_plugins (bool forward);
339  void move_instrument_down (bool postfader = false);
340 
341  bool strict_io () const { return _strict_io; }
342  bool set_strict_io (bool);
353  bool reset_plugin_insert (std::shared_ptr<Processor> proc);
361  bool customize_plugin_insert (std::shared_ptr<Processor> proc, uint32_t count, ChanCount outs, ChanCount sinks);
362  bool add_remove_sidechain (std::shared_ptr<Processor> proc, bool);
363  bool plugin_preset_output (std::shared_ptr<Processor> proc, ChanCount outs);
364 
365  /* enable sidechain input for a given processor
366  *
367  * The sidechain itself is an IO port object with variable number of channels and configured independently.
368  * Adding/removing the port itself however requires reconfiguring the route and is hence
369  * not a plugin operation itself.
370  *
371  * @param proc the processor to add sidechain inputs to
372  * @returns true on success
373  */
374  bool add_sidechain (std::shared_ptr<Processor> proc) { return add_remove_sidechain (proc, true); }
375  /* remove sidechain input from given processor
376  * @param proc the processor to remove the sidechain input from
377  * @returns true on success
378  */
379  bool remove_sidechain (std::shared_ptr<Processor> proc) { return add_remove_sidechain (proc, false); }
380 
381  samplecnt_t update_signal_latency (bool apply_to_delayline = false, bool* delayline_update_needed = NULL);
383 
385  void set_public_port_latencies (samplecnt_t, bool playback, bool with_latcomp) const;
386 
387  samplecnt_t signal_latency() const { return _signal_latency; }
388  samplecnt_t playback_latency (bool incl_downstream = false) const;
389 
393 
394  bool is_track();
395 
402  int64_t track_number() const { return _track_number; }
403 
404  void set_track_number(int64_t tn) {
405  if (tn == _track_number) { return; }
406  _track_number = tn;
407  track_number_changed();
408  PropertyChanged (ARDOUR::Properties::name);
409  }
410 
412  None = 0x0,
413  CanReplace = 0x1,
414  MultiOut = 0x2,
415  };
416 
418  static PBD::Signal<int(std::shared_ptr<Route>, std::shared_ptr<PluginInsert>, PluginSetupOptions )> PluginSetup;
419 
421  static PBD::Signal<void(std::weak_ptr<Route> )> FanOut;
422 
432 
435 
436  /* stateful */
437  XMLNode& get_state() const;
439  virtual int set_state (const XMLNode&, int version);
440  virtual int import_state (const XMLNode&, bool use_pbd_ids = true, bool processor_only = true);
441 
443  void set_processor_state (const XMLNode&, int version);
444  virtual bool set_processor_state (XMLNode const & node, int version, XMLProperty const* prop, ProcessorList& new_order, bool& must_configure);
445 
446  std::weak_ptr<Route> weakroute ();
447 
448  int save_as_template (const std::string& path, const std::string& name, const std::string& description );
449 
451 
452  int add_aux_send (std::shared_ptr<Route>, std::shared_ptr<Processor>);
453  int add_foldback_send (std::shared_ptr<Route>, bool post_fader);
456 
462  bool direct_feeds_according_to_reality (std::shared_ptr<GraphNode>, bool* via_send_only = 0);
463 
464  std::string graph_node_name () const {
465  return name ();
466  }
467 
473  bool direct_feeds_according_to_graph (std::shared_ptr<Route>, bool* via_send_only = 0);
474 
479  bool feeds (std::shared_ptr<Route>);
480 
485  std::set<std::shared_ptr<Route>> signal_sources (bool via_sends_only = false);
486 
491 
492  /* Controls (not all directly owned by the Route) */
493 
494  std::shared_ptr<AutomationControl> get_control (const Evoral::Parameter& param);
495 
496  std::shared_ptr<SoloControl> solo_control() const {
497  return _solo_control;
498  }
499 
500  std::shared_ptr<MuteControl> mute_control() const {
501  return _mute_control;
502  }
503 
504  bool can_be_muted_by_others () const { return can_solo(); }
505  bool muted () const { return _mute_control->muted(); }
506  bool muted_by_masters () const { return _mute_control->muted_by_masters(); }
507  bool muted_by_self () const { return _mute_control->muted_by_self(); }
508  bool muted_by_others_soloing () const;
509 
510  std::shared_ptr<SoloIsolateControl> solo_isolate_control() const {
511  return _solo_isolate_control;
512  }
513 
514  std::shared_ptr<SoloSafeControl> solo_safe_control() const {
515  return _solo_safe_control;
516  }
517 
518  /* Route doesn't own these items, but sub-objects that it does own have them
519  and to make UI code a bit simpler, we provide direct access to them
520  here.
521  */
522 
523  std::shared_ptr<Panner> panner() const; /* may return null */
524  std::shared_ptr<PannerShell> panner_shell() const;
525  std::shared_ptr<Pannable> pannable() const;
526 
527  std::shared_ptr<GainControl> gain_control() const;
528  std::shared_ptr<GainControl> trim_control() const;
529  std::shared_ptr<GainControl> volume_control() const;
530  std::shared_ptr<PhaseControl> phase_control() const;
531 
533 
534  bool volume_applies_to_output () const {
535  return _volume_applies_to_output;
536  }
537 
545  std::shared_ptr<Processor> the_instrument() const;
546  InstrumentInfo& instrument_info() { return _instrument_info; }
547  bool instrument_fanned_out () const { return _instrument_fanned_out;}
548 
549 
550  /* "well-known" controls.
551  * Any or all of these may return NULL.
552  */
553 
554  std::shared_ptr<AutomationControl> pan_azimuth_control() const;
555  std::shared_ptr<AutomationControl> pan_elevation_control() const;
556  std::shared_ptr<AutomationControl> pan_width_control() const;
557  std::shared_ptr<AutomationControl> pan_frontback_control() const;
558  std::shared_ptr<AutomationControl> pan_lfe_control() const;
559 
560  uint32_t eq_band_cnt () const;
561  std::string eq_band_name (uint32_t) const;
562 
563  std::shared_ptr<AutomationControl> mapped_control (enum WellKnownCtrl, uint32_t band = 0) const;
564  std::shared_ptr<ReadOnlyControl> mapped_output (enum WellKnownData) const;
565 
566  std::shared_ptr<AutomationControl> send_level_controllable (uint32_t n, bool locked = false) const;
567  std::shared_ptr<AutomationControl> send_enable_controllable (uint32_t n) const;
568  std::shared_ptr<AutomationControl> send_pan_azimuth_controllable (uint32_t n) const;
569  std::shared_ptr<AutomationControl> send_pan_azimuth_enable_controllable (uint32_t n) const;
570 
571  std::string send_name (uint32_t n) const;
572 
573  std::shared_ptr<AutomationControl> master_send_enable_controllable () const;
574 
576 
578 
579  /* can only be executed by a route for which is_monitor() is true
580  * (i.e. the monitor out)
581  */
582  void monitor_run (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes);
583 
584  bool slaved_to (std::shared_ptr<VCA>) const;
585  bool slaved () const;
586 
587  virtual void use_captured_sources (SourceList& srcs, CaptureInfos const &) {}
588 
589 
590 protected:
591  friend class Session;
592 
593  void process ();
594 
596  void set_listen (bool);
597 
598  virtual void set_block_size (pframes_t nframes);
599 
600  virtual int no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing);
601 
602  virtual void snapshot_out_of_band_data (samplecnt_t /* nframes */) {}
603  virtual void write_out_of_band_data (BufferSet&, samplecnt_t /* nframes */) const {}
604  virtual void update_controls (BufferSet const&) {}
605 
607  samplepos_t start_sample, samplepos_t end_sample,
608  pframes_t nframes,
609  bool gain_automation_ok,
610  bool run_disk_processors);
611 
613 
614  virtual void bounce_process (BufferSet& bufs,
615  samplepos_t start_sample, samplecnt_t nframes,
616  std::shared_ptr<Processor> endpoint, bool include_endpoint,
617  bool for_export, bool for_freeze);
618 
619  samplecnt_t bounce_get_latency (std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) const;
620  ChanCount bounce_get_output_streams (ChanCount &cc, std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) const;
621 
622  bool can_freeze_processor (std::shared_ptr<Processor>, bool allow_routing = false) const;
623 
624  bool _active;
627 
630 
631  std::shared_ptr<IO> _input;
632  std::shared_ptr<IO> _output;
633 
634  std::shared_ptr<Delivery> _main_outs;
635  std::shared_ptr<InternalSend> _monitor_send;
636  std::shared_ptr<InternalReturn> _intreturn;
637  std::shared_ptr<MonitorProcessor> _monitor_control;
638  std::shared_ptr<Pannable> _pannable;
639  std::shared_ptr<DiskReader> _disk_reader;
640  std::shared_ptr<DiskWriter> _disk_writer;
641 #ifdef HAVE_BEATBOX
642  std::shared_ptr<BeatBox> _beatbox;
643 #endif
644  std::shared_ptr<MonitorControl> _monitoring_control;
645  std::shared_ptr<SurroundSend> _surround_send;
646  std::shared_ptr<SurroundReturn> _surround_return;
647 
649 
650  enum {
651  EmitNone = 0x00,
652  EmitMeterChanged = 0x01,
653  EmitMeterVisibilityChange = 0x02,
654  EmitRtProcessorChange = 0x04,
655  EmitSendReturnChange = 0x08
656  };
657 
659  std::atomic<int> _pending_process_reorder;
660  std::atomic<int> _pending_listen_change;
661  std::atomic<int> _pending_surround_send;
662  std::atomic<int> _pending_signals;
663 
666 
668 
669  bool _recordable : 1;
670 
671  std::shared_ptr<SoloControl> _solo_control;
672  std::shared_ptr<MuteControl> _mute_control;
673  std::shared_ptr<SoloIsolateControl> _solo_isolate_control;
674  std::shared_ptr<SoloSafeControl> _solo_safe_control;
675 
676  std::string _comment;
678 
684 
685  virtual ChanCount input_streams () const;
686 
687  virtual XMLNode& state (bool save_template) const;
688 
690 
692 
695 
696  uint32_t pans_required() const;
698 
699  std::shared_ptr<GainControl> _gain_control;
700  std::shared_ptr<GainControl> _trim_control;
701  std::shared_ptr<GainControl> _volume_control;
702  std::shared_ptr<PhaseControl> _phase_control;
703  std::shared_ptr<Amp> _amp;
704  std::shared_ptr<Amp> _trim;
705  std::shared_ptr<Amp> _volume;
706  std::shared_ptr<PeakMeter> _meter;
707  std::shared_ptr<PolarityProcessor> _polarity;
708  std::shared_ptr<TriggerBox> _triggerbox;
709 
711 
712  std::shared_ptr<DelayLine> _delayline;
713 
714  bool is_internal_processor (std::shared_ptr<Processor>) const;
715 
716  std::shared_ptr<Processor> the_instrument_unlocked() const;
717 
719 
721 
722 private:
723  /* no copy construction */
724  Route (Route const &);
725 
726  int set_state_2X (const XMLNode&, int);
727  void set_processor_state_2X (XMLNodeList const &, int);
728 
731 
732  void processor_selfdestruct (std::weak_ptr<Processor>);
733  std::vector<std::weak_ptr<Processor> > selfdestruct_sequence;
735 
738 
740  mutable std::map<Route*, bool> _connection_cache;
741 
744  void apply_processor_order (const ProcessorList& new_order);
745 
746  std::list<std::pair<ChanCount, ChanCount> > try_configure_processors (ChanCount, ProcessorStreams *);
747  std::list<std::pair<ChanCount, ChanCount> > try_configure_processors_unlocked (ChanCount, ProcessorStreams *);
748 
749  bool add_processor_from_xml_2X (const XMLNode&, int);
750 
751  void placement_range (Placement p, ProcessorList::iterator& start, ProcessorList::iterator& end);
752 
753  void set_self_solo (bool yn);
754  void unpan ();
755 
757  samplecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, samplecnt_t) const;
758 
760 
761  pframes_t latency_preroll (pframes_t nframes, samplepos_t& start_sample, samplepos_t& end_sample);
762 
763  void run_route (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, bool gain_automation_ok, bool run_disk_reader);
764  void fill_buffers_with_input (BufferSet& bufs, std::shared_ptr<IO> io, pframes_t nframes);
765 
769 
770  void set_plugin_state_dir (std::weak_ptr<Processor>, const std::string&);
771 
776  public:
778  : _route (r)
779  , _processors (r->_processors)
780  , _processor_max_streams (r->processor_max_streams)
781  { }
782 
783  void restore () {
784  _route->_processors = _processors;
785  _route->processor_max_streams = _processor_max_streams;
786  }
787 
788  private:
789  /* this should perhaps be a shared_ptr, but ProcessorStates will
790  not hang around long enough for it to matter.
791  */
795  };
796 
797  friend class ProcessorState;
798 
799  std::shared_ptr<CapturingProcessor> _capturing_processor;
800 
801  int64_t _track_number;
807 
808  void add_well_known_ctrl (WellKnownCtrl, std::shared_ptr<PluginInsert>, int param);
810 
811  std::map<WellKnownCtrl, std::vector<std::weak_ptr<AutomationControl>>> _well_known_map;
812 
818  std::weak_ptr<Processor> _processor_after_last_custom_meter;
819 
822 };
823 
824 } // namespace ARDOUR
825 
void None
Definition: TypeList.h:49
ProcessorList _processors
Definition: route.h:793
ChanCount _processor_max_streams
Definition: route.h:794
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:421
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:418
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:799
std::shared_ptr< IO > _input
Definition: route.h:631
bool can_solo() const
Definition: route.h:197
int replace_processor(std::shared_ptr< Processor > old, std::shared_ptr< Processor > sub, ProcessorStreams *err=0)
PBD::Signal< void()> io_changed
Definition: route.h:434
void clear_processors(Placement)
virtual void input_change_handler(IOChange)
std::shared_ptr< MonitorControl > monitoring_control() const
Definition: route.h:153
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:131
void shift(timepos_t const &, timecnt_t const &)
void push_solo_upstream(int32_t delta)
std::map< Route *, bool > _connection_cache
Definition: route.h:740
void flush_processors()
bool add_sidechain(std::shared_ptr< Processor > proc)
Definition: route.h:374
bool _volume_applies_to_output
Definition: route.h:710
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:603
samplecnt_t playback_latency(bool incl_downstream=false) const
PBD::Signal< void()> track_number_changed
Definition: route.h:401
void reset_instrument_info()
void set_pingmgr_proxy(RoutePinWindowProxy *wp)
Definition: route.h:270
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:236
bool muted_by_others_soloing() const
std::string _comment
Definition: route.h:676
std::shared_ptr< InternalSend > _monitor_send
Definition: route.h:635
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:136
std::shared_ptr< Amp > _trim
Definition: route.h:704
bool can_monitor() const
Definition: route.h:203
std::shared_ptr< MonitorControl > _monitoring_control
Definition: route.h:644
std::string comment()
Definition: route.h:144
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:429
std::shared_ptr< SoloControl > _solo_control
Definition: route.h:671
std::shared_ptr< SoloSafeControl > solo_safe_control() const
Definition: route.h:514
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:547
bool _strict_io
Definition: route.h:802
void output_change_handler(IOChange)
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:170
std::shared_ptr< AutomationControl > pan_elevation_control() const
int64_t track_number() const
Definition: route.h:402
bool _recordable
Definition: route.h:669
std::shared_ptr< GainControl > volume_control() const
PBD::Signal< void()> denormal_protection_changed
Definition: route.h:391
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:660
ChanCount processor_out_streams
Definition: route.h:694
std::string eq_band_name(uint32_t) const
std::shared_ptr< InternalReturn > internal_return() const
Definition: route.h:288
std::shared_ptr< PolarityProcessor > polarity() const
Definition: route.h:232
samplecnt_t set_private_port_latencies(bool playback) const
InstrumentInfo _instrument_info
Definition: route.h:681
bool muted() const
Definition: route.h:505
samplecnt_t update_port_latencies(PortSet &ports, PortSet &feeders, bool playback, samplecnt_t) const
samplecnt_t _output_latency
Definition: route.h:626
bool can_be_muted_by_others() const
Definition: route.h:504
virtual XMLNode & state(bool save_template) const
int64_t _track_number
Definition: route.h:801
void disable_plugins(Placement)
std::shared_ptr< MuteControl > _mute_control
Definition: route.h:672
std::shared_ptr< Processor > the_instrument_unlocked() const
std::shared_ptr< PeakMeter > _meter
Definition: route.h:706
bool _instrument_fanned_out
Definition: route.h:682
virtual int import_state(const XMLNode &, bool use_pbd_ids=true, bool processor_only=true)
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:645
std::shared_ptr< SoloIsolateControl > solo_isolate_control() const
Definition: route.h:510
void disable_plugins()
void listen_position_changed()
ChanCount max_processor_streams() const
Definition: route.h:265
pframes_t latency_preroll(pframes_t nframes, samplepos_t &start_sample, samplepos_t &end_sample)
void sidechain_change_handler(IOChange)
void all_visible_processors_active(bool)
DataType _default_type
Definition: route.h:680
int configure_processors_unlocked(ProcessorStreams *, PBD::RWLock::WriterLock *)
uint32_t color() const
bool _have_internal_generator
Definition: route.h:679
bool _active
Definition: route.h:624
std::shared_ptr< Processor > nth_processor(uint32_t n)
Definition: route.h:247
std::vector< std::weak_ptr< Processor > > selfdestruct_sequence
Definition: route.h:733
bool _custom_meter_position_noted
Definition: route.h:814
std::atomic< int > _pending_process_reorder
Definition: route.h:659
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:818
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:637
ProcessorList _pending_processor_order
Definition: route.h:658
void setup_invisible_processors()
std::shared_ptr< Pannable > _pannable
Definition: route.h:638
std::shared_ptr< Processor > before_processor_for_placement(Placement)
std::shared_ptr< IO > output() const
Definition: route.h:132
std::atomic< int > _pending_signals
Definition: route.h:662
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:534
int reorder_processors(const ProcessorList &new_order, ProcessorStreams *err=0)
void emit_pending_signals()
std::shared_ptr< SoloIsolateControl > _solo_isolate_control
Definition: route.h:673
DataType data_type() const
Definition: route.h:122
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:707
void set_active(bool yn, void *)
bool customize_plugin_insert(std::shared_ptr< Processor > proc, uint32_t count, ChanCount outs, ChanCount sinks)
PBD::Signal< void()> comment_changed
Definition: route.h:392
std::shared_ptr< AutomationControl > send_pan_azimuth_controllable(uint32_t n) const
void queue_surround_processors_changed()
Definition: route.h:279
std::shared_ptr< MonitorProcessor > monitor_control() const
Definition: route.h:289
samplecnt_t _signal_latency
Definition: route.h:625
std::shared_ptr< Processor > plugin_by_uri(std::string const &, int offset=0) const
Route(Route const &)
std::shared_ptr< AutomationControl > send_pan_azimuth_enable_controllable(uint32_t n) const
bool _initial_io_setup
Definition: route.h:804
std::shared_ptr< AutomationControl > send_enable_controllable(uint32_t n) const
PluginSetupOptions
Definition: route.h:411
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
PBD::RWLock _processor_lock
Definition: route.h:629
bool soloed() const
Definition: route.h:193
std::shared_ptr< SurroundReturn > surround_return() const
Definition: route.h:155
InstrumentInfo & instrument_info()
Definition: route.h:546
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:158
void enable_monitor_send()
std::list< std::shared_ptr< Processor > > ProcessorList
Definition: route.h:115
std::shared_ptr< MuteControl > mute_control() const
Definition: route.h:500
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:496
gain_t _monitor_gain
Definition: route.h:806
MeterPoint meter_point() const
Definition: route.h:215
std::shared_ptr< IO > _output
Definition: route.h:632
void update_send_delaylines()
virtual void filter_input(BufferSet &)
Definition: route.h:162
bool strict_io() const
Definition: route.h:341
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:604
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:712
int input_port_count_changing(ChanCount)
void apply_processor_order(const ProcessorList &new_order)
std::shared_ptr< PhaseControl > _phase_control
Definition: route.h:702
void set_meter_point(MeterPoint)
void set_loop(ARDOUR::Location *)
IOVector all_outputs() const
ChanCount processor_max_streams
Definition: route.h:693
void push_solo_isolate_upstream(int32_t delta)
std::shared_ptr< GainControl > _gain_control
Definition: route.h:699
std::map< WellKnownCtrl, std::vector< std::weak_ptr< AutomationControl > > > _well_known_map
Definition: route.h:811
virtual bool can_record()
Definition: route.h:171
std::shared_ptr< InternalReturn > _intreturn
Definition: route.h:636
uint32_t eq_band_cnt() const
bool active() const
Definition: route.h:139
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:154
virtual void snapshot_out_of_band_data(samplecnt_t)
Definition: route.h:602
void set_patch_selector_dialog(PatchChangeGridDialog *d)
Definition: route.h:273
void set_comment(std::string str, void *src)
PBD::Signal< void(RouteProcessorChange)> processors_changed
Definition: route.h:424
std::shared_ptr< const PeakMeter > peak_meter() const
Definition: route.h:234
std::shared_ptr< Send > internal_send_for(std::shared_ptr< const Route > target) const
bool muted_by_self() const
Definition: route.h:507
void set_plugin_state_dir(std::weak_ptr< Processor >, const std::string &)
MeterPoint _meter_point
Definition: route.h:664
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:646
std::shared_ptr< GainControl > _volume_control
Definition: route.h:701
void disable_processors()
bool add_processor_from_xml_2X(const XMLNode &, int)
PBD::Signal< void()> meter_change
Definition: route.h:431
RoutePinWindowProxy * _pinmgr_proxy
Definition: route.h:820
std::shared_ptr< AutomationControl > pan_azimuth_control() const
bool feeds(std::shared_ptr< Route >)
std::shared_ptr< Delivery > _main_outs
Definition: route.h:634
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:821
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:379
PBD::Mutex selfdestruct_lock
Definition: route.h:734
Location * _loop_location
Definition: route.h:683
std::shared_ptr< Amp > trim() const
Definition: route.h:231
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:404
std::shared_ptr< Panner > panner() const
void clear_all_solo_state()
virtual int set_state(const XMLNode &, int version)
ChanCount n_outputs() const
Definition: route.h:137
std::shared_ptr< Processor > nth_plugin(uint32_t n) const
virtual void realtime_locate(bool)
Definition: route.h:176
DiskIOPoint disk_io_point() const
Definition: route.h:223
static void set_name_in_state(XMLNode &, const std::string &)
int output_port_count_changing(ChanCount)
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:587
samplecnt_t signal_latency() const
Definition: route.h:387
void protect_automation()
std::shared_ptr< SoloSafeControl > _solo_safe_control
Definition: route.h:674
bool _in_sidechain_setup
Definition: route.h:805
std::shared_ptr< DiskWriter > _disk_writer
Definition: route.h:640
MeterPoint _pending_meter_point
Definition: route.h:665
std::atomic< int > _pending_surround_send
Definition: route.h:661
bool _in_configure_processors
Definition: route.h:803
std::shared_ptr< CapturingProcessor > add_export_point()
bool soloed_by_others_downstream() const
Definition: route.h:191
void set_comment_editor(RouteCommentEditor *w)
Definition: route.h:148
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:269
std::shared_ptr< Amp > _amp
Definition: route.h:703
std::shared_ptr< Amp > amp() const
Definition: route.h:230
bool soloed_by_others_upstream() const
Definition: route.h:190
RouteCommentEditor * comment_editor() const
Definition: route.h:147
RouteCommentEditor * _comment_editor_window
Definition: route.h:677
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:639
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:285
bool is_safe() const
Definition: route.h:200
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:705
void foreach_processor(std::function< void(std::weak_ptr< Processor >)> method) const
Definition: route.h:240
std::shared_ptr< PhaseControl > phase_control() const
std::shared_ptr< Delivery > main_outs() const
Definition: route.h:287
bool has_external_redirects() const
PatchChangeGridDialog * patch_selector_dialog() const
Definition: route.h:272
std::shared_ptr< PeakMeter > peak_meter()
Definition: route.h:233
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:189
std::shared_ptr< GainControl > _trim_control
Definition: route.h:700
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:192
ProcessorList _processors
Definition: route.h:628
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:425
bool _denormal_protection
Definition: route.h:667
virtual ~Route()
DiskIOPoint _disk_io_point
Definition: route.h:648
std::shared_ptr< PeakMeter > shared_peak_meter() const
Definition: route.h:235
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:390
std::shared_ptr< AutomationControl > mapped_control(enum WellKnownCtrl, uint32_t band=0) const
virtual int init()
PBD::Signal< void(void *)> SelectedChanged
Definition: route.h:450
std::shared_ptr< TriggerBox > _triggerbox
Definition: route.h:708
std::string graph_node_name() const
Definition: route.h:464
bool muted_by_masters() const
Definition: route.h:506
Definition: id.h:33
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:39
ProcessorStreams(size_t i=0, ChanCount c=ChanCount())
Definition: route.h:301
uint32_t index
Index of processor where configuration failed.
Definition: route.h:303
ChanCount count
Input requested of processor.
Definition: route.h:304
std::vector< XMLNode * > XMLNodeList
Definition: xml++.h:66