2008-06-02 17:41:35 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2000-2002 Paul Davis
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_route_h__
|
|
|
|
#define __ardour_route_h__
|
|
|
|
|
|
|
|
#include <cmath>
|
2009-02-15 18:47:09 -05:00
|
|
|
#include <cstring>
|
2008-06-02 17:41:35 -04:00
|
|
|
#include <list>
|
|
|
|
#include <map>
|
2009-02-15 18:47:09 -05:00
|
|
|
#include <set>
|
2008-06-02 17:41:35 -04:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
2009-01-30 15:18:31 -05:00
|
|
|
#include <boost/weak_ptr.hpp>
|
2010-08-13 17:33:01 -04:00
|
|
|
#include <boost/dynamic_bitset.hpp>
|
2011-02-22 16:15:42 -05:00
|
|
|
#include <boost/enable_shared_from_this.hpp>
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2012-07-25 13:48:55 -04:00
|
|
|
#include <glibmm/threads.h>
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "pbd/fastlog.h"
|
|
|
|
#include "pbd/xml++.h"
|
|
|
|
#include "pbd/undo.h"
|
2009-10-14 12:10:01 -04:00
|
|
|
#include "pbd/stateful.h"
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "pbd/controllable.h"
|
|
|
|
#include "pbd/destructible.h"
|
|
|
|
|
|
|
|
#include "ardour/ardour.h"
|
2012-06-11 08:07:17 -04:00
|
|
|
#include "ardour/instrument_info.h"
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/io.h"
|
2013-10-17 10:02:11 -04:00
|
|
|
#include "ardour/libardour_visibility.h"
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/types.h"
|
2009-06-09 16:21:19 -04:00
|
|
|
#include "ardour/mute_master.h"
|
2009-12-09 22:25:32 -05:00
|
|
|
#include "ardour/route_group_member.h"
|
2010-06-03 15:50:22 -04:00
|
|
|
#include "ardour/graphnode.h"
|
2010-07-12 21:26:30 -04:00
|
|
|
#include "ardour/automatable.h"
|
2010-11-26 18:30:48 -05:00
|
|
|
#include "ardour/unknown_processor.h"
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
class Amp;
|
2014-06-11 11:14:18 -04:00
|
|
|
class DelayLine;
|
2009-05-13 17:34:09 -04:00
|
|
|
class Delivery;
|
2009-01-30 15:18:31 -05:00
|
|
|
class IOProcessor;
|
2009-06-09 16:21:19 -04:00
|
|
|
class Panner;
|
2011-01-26 20:31:03 -05:00
|
|
|
class PannerShell;
|
2011-02-15 13:47:10 -05:00
|
|
|
class PortSet;
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
class Processor;
|
2008-06-02 17:41:35 -04:00
|
|
|
class RouteGroup;
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
class Send;
|
2009-06-16 10:58:33 -04:00
|
|
|
class InternalReturn;
|
2010-03-10 12:31:16 -05:00
|
|
|
class MonitorProcessor;
|
2011-01-26 20:31:03 -05:00
|
|
|
class Pannable;
|
2011-01-16 14:41:11 -05:00
|
|
|
class CapturingProcessor;
|
2011-02-19 19:55:52 -05:00
|
|
|
class InternalSend;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2013-10-17 10:02:11 -04:00
|
|
|
class LIBARDOUR_API Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this<Route>
|
2008-06-02 17:41:35 -04:00
|
|
|
{
|
2009-05-15 22:51:17 -04:00
|
|
|
public:
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2009-05-12 13:03:42 -04:00
|
|
|
typedef std::list<boost::shared_ptr<Processor> > ProcessorList;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
enum Flag {
|
2013-04-06 16:04:02 -04:00
|
|
|
Auditioner = 0x1,
|
2008-06-02 17:41:35 -04:00
|
|
|
MasterOut = 0x2,
|
2010-03-22 17:35:35 -04:00
|
|
|
MonitorOut = 0x4
|
2008-06-02 17:41:35 -04:00
|
|
|
};
|
|
|
|
|
2009-10-15 14:56:11 -04:00
|
|
|
Route (Session&, std::string name, Flag flags = Flag(0), DataType default_type = DataType::AUDIO);
|
2008-06-02 17:41:35 -04:00
|
|
|
virtual ~Route();
|
|
|
|
|
2010-03-24 23:40:07 -04:00
|
|
|
virtual int init ();
|
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<IO> input() const { return _input; }
|
|
|
|
boost::shared_ptr<IO> output() const { return _output; }
|
|
|
|
|
|
|
|
ChanCount n_inputs() const { return _input->n_ports(); }
|
|
|
|
ChanCount n_outputs() const { return _output->n_ports(); }
|
|
|
|
|
|
|
|
bool active() const { return _active; }
|
2011-01-10 18:37:34 -05:00
|
|
|
void set_active (bool yn, void *);
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
static std::string ensure_track_or_route_name(std::string, Session &);
|
|
|
|
|
|
|
|
std::string comment() { return _comment; }
|
|
|
|
void set_comment (std::string str, void *src);
|
|
|
|
|
2009-05-13 17:34:09 -04:00
|
|
|
bool set_name (const std::string& str);
|
2011-11-16 18:03:59 -05:00
|
|
|
static void set_name_in_state (XMLNode &, const std::string &);
|
2009-05-13 17:34:09 -04:00
|
|
|
|
2013-10-20 09:19:43 -04:00
|
|
|
uint32_t order_key () const;
|
|
|
|
bool has_order_key () const;
|
|
|
|
void set_order_key (uint32_t);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2013-04-06 16:04:02 -04:00
|
|
|
bool is_auditioner() const { return _flags & Auditioner; }
|
2008-06-02 17:41:35 -04:00
|
|
|
bool is_master() const { return _flags & MasterOut; }
|
2010-03-22 17:35:35 -04:00
|
|
|
bool is_monitor() const { return _flags & MonitorOut; }
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2011-12-26 10:37:14 -05:00
|
|
|
virtual MonitorState monitoring_state () const;
|
|
|
|
virtual MeterState metering_state () const;
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
/* these are the core of the API of a Route. see the protected sections as well */
|
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
2011-10-21 11:05:33 -04:00
|
|
|
int declick, bool& need_butler);
|
2009-02-16 21:11:49 -05:00
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
2011-10-21 11:05:33 -04:00
|
|
|
bool state_changing);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
virtual int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
2011-10-21 11:05:33 -04:00
|
|
|
bool& need_butler);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
virtual bool can_record() { return false; }
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2010-07-24 12:40:56 -04:00
|
|
|
virtual void set_record_enabled (bool /*yn*/, void * /*src*/) {}
|
2008-06-02 17:41:35 -04:00
|
|
|
virtual bool record_enabled() const { return false; }
|
2015-06-16 08:44:03 -04:00
|
|
|
virtual void set_record_safe (bool yn, void *src) {}
|
|
|
|
virtual bool record_safe () const {return false; }
|
2010-12-07 09:44:47 -05:00
|
|
|
virtual void nonrealtime_handle_transport_stopped (bool abort, bool did_locate, bool flush_processors);
|
|
|
|
virtual void realtime_handle_transport_stopped () {}
|
2011-05-30 17:37:58 -04:00
|
|
|
virtual void realtime_locate () {}
|
2012-07-13 17:05:45 -04:00
|
|
|
virtual void non_realtime_locate (framepos_t);
|
2008-06-02 17:41:35 -04:00
|
|
|
virtual void set_pending_declick (int);
|
|
|
|
|
|
|
|
/* end of vfunc-based API */
|
|
|
|
|
2012-04-14 18:04:51 -04:00
|
|
|
void shift (framepos_t, framecnt_t);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
void set_gain (gain_t val, void *src);
|
|
|
|
void inc_gain (gain_t delta, void *src);
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2015-04-25 12:07:01 -04:00
|
|
|
void set_trim (gain_t val, void *src);
|
|
|
|
void inc_trim (gain_t delta, void *src);
|
|
|
|
|
2009-11-18 08:25:13 -05:00
|
|
|
void set_mute_points (MuteMaster::MutePoint);
|
2010-05-17 19:28:13 -04:00
|
|
|
MuteMaster::MutePoint mute_points () const;
|
2010-04-27 13:10:04 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
bool muted () const;
|
2010-04-27 13:10:04 -04:00
|
|
|
void set_mute (bool yn, void* src);
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2015-05-29 16:17:46 -04:00
|
|
|
bool muted_by_others() const;
|
|
|
|
|
2009-06-17 11:50:29 -04:00
|
|
|
/* controls use set_solo() to modify this route's solo state
|
|
|
|
*/
|
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
void set_solo (bool yn, void *src);
|
2009-12-10 15:51:35 -05:00
|
|
|
bool soloed () const { return self_soloed () || soloed_by_others (); }
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
bool soloed_by_others () const { return _soloed_by_others_upstream||_soloed_by_others_downstream; }
|
2010-05-01 11:09:19 -04:00
|
|
|
bool soloed_by_others_upstream () const { return _soloed_by_others_upstream; }
|
|
|
|
bool soloed_by_others_downstream () const { return _soloed_by_others_downstream; }
|
2009-11-21 12:20:57 -05:00
|
|
|
bool self_soloed () const { return _self_solo; }
|
2011-06-01 12:50:12 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
void set_solo_isolated (bool yn, void *src);
|
|
|
|
bool solo_isolated() const;
|
2009-07-01 09:36:50 -04:00
|
|
|
|
2009-11-21 14:33:09 -05:00
|
|
|
void set_solo_safe (bool yn, void *src);
|
|
|
|
bool solo_safe() const;
|
|
|
|
|
2009-07-01 09:36:50 -04:00
|
|
|
void set_listen (bool yn, void* src);
|
2011-02-19 19:55:32 -05:00
|
|
|
bool listening_via_monitor () const;
|
2012-01-17 20:30:44 -05:00
|
|
|
void enable_monitor_send ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2010-08-13 17:33:01 -04:00
|
|
|
void set_phase_invert (uint32_t, bool yn);
|
|
|
|
void set_phase_invert (boost::dynamic_bitset<>);
|
|
|
|
bool phase_invert (uint32_t) const;
|
|
|
|
boost::dynamic_bitset<> phase_invert () const;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2009-06-10 14:10:07 -04:00
|
|
|
void set_denormal_protection (bool yn);
|
2009-06-09 16:21:19 -04:00
|
|
|
bool denormal_protection() const;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2011-01-09 10:10:59 -05:00
|
|
|
void set_meter_point (MeterPoint, bool force = false);
|
2015-04-28 16:18:30 -04:00
|
|
|
bool apply_processor_changes_rt ();
|
|
|
|
void emit_pending_signals ();
|
2015-04-26 00:00:08 -04:00
|
|
|
MeterPoint meter_point() const { return _pending_meter_point; }
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2013-07-07 08:39:26 -04:00
|
|
|
void set_meter_type (MeterType t) { _meter_type = t; }
|
|
|
|
MeterType meter_type() const { return _meter_type; }
|
2013-07-07 00:17:02 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
/* Processors */
|
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<Amp> amp() const { return _amp; }
|
2015-04-24 15:45:53 -04:00
|
|
|
boost::shared_ptr<Amp> trim() const { return _trim; }
|
2009-06-09 16:21:19 -04:00
|
|
|
PeakMeter& peak_meter() { return *_meter.get(); }
|
|
|
|
const PeakMeter& peak_meter() const { return *_meter.get(); }
|
|
|
|
boost::shared_ptr<PeakMeter> shared_peak_meter() const { return _meter; }
|
2014-06-11 11:14:18 -04:00
|
|
|
boost::shared_ptr<DelayLine> delay_line() const { return _delayline; }
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
void flush_processors ();
|
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
void foreach_processor (boost::function<void(boost::weak_ptr<Processor>)> method) {
|
2012-07-25 13:48:55 -04:00
|
|
|
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
|
2008-06-02 17:41:35 -04:00
|
|
|
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
2008-12-16 18:21:01 -05:00
|
|
|
method (boost::weak_ptr<Processor> (*i));
|
2008-06-02 17:41:35 -04:00
|
|
|
}
|
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
boost::shared_ptr<Processor> nth_processor (uint32_t n) {
|
2012-07-25 13:48:55 -04:00
|
|
|
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
|
2008-06-02 17:41:35 -04:00
|
|
|
ProcessorList::iterator i;
|
2009-02-25 16:48:32 -05:00
|
|
|
for (i = _processors.begin(); i != _processors.end() && n; ++i, --n) {}
|
2008-06-02 17:41:35 -04:00
|
|
|
if (i == _processors.end()) {
|
2009-01-30 15:18:31 -05:00
|
|
|
return boost::shared_ptr<Processor> ();
|
2008-06-02 17:41:35 -04:00
|
|
|
} else {
|
|
|
|
return *i;
|
|
|
|
}
|
|
|
|
}
|
2009-05-13 17:34:09 -04:00
|
|
|
|
2011-11-21 11:34:05 -05:00
|
|
|
boost::shared_ptr<Processor> processor_by_id (PBD::ID) const;
|
|
|
|
|
2009-12-30 14:33:52 -05:00
|
|
|
boost::shared_ptr<Processor> nth_plugin (uint32_t n);
|
|
|
|
boost::shared_ptr<Processor> nth_send (uint32_t n);
|
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
bool has_io_processor_named (const std::string&);
|
2009-05-04 11:50:51 -04:00
|
|
|
ChanCount max_processor_streams () const { return processor_max_streams; }
|
2009-05-13 17:34:09 -04:00
|
|
|
|
2010-11-26 18:30:48 -05:00
|
|
|
std::list<std::string> unknown_processors () const;
|
2011-06-01 12:50:12 -04:00
|
|
|
|
2009-05-13 17:34:09 -04:00
|
|
|
/* special processors */
|
|
|
|
|
2011-06-14 15:00:08 -04:00
|
|
|
boost::shared_ptr<InternalSend> monitor_send() const { return _monitor_send; }
|
2010-03-10 12:31:16 -05:00
|
|
|
boost::shared_ptr<Delivery> main_outs() const { return _main_outs; }
|
|
|
|
boost::shared_ptr<InternalReturn> internal_return() const { return _intreturn; }
|
|
|
|
boost::shared_ptr<MonitorProcessor> monitor_control() const { return _monitor_control; }
|
|
|
|
boost::shared_ptr<Send> internal_send_for (boost::shared_ptr<const Route> target) const;
|
2009-06-25 16:46:39 -04:00
|
|
|
void add_internal_return ();
|
2011-02-19 19:55:52 -05:00
|
|
|
void add_send_to_internal_return (InternalSend *);
|
|
|
|
void remove_send_from_internal_return (InternalSend *);
|
2011-02-19 19:55:32 -05:00
|
|
|
void listen_position_changed ();
|
2011-01-16 14:41:11 -05:00
|
|
|
boost::shared_ptr<CapturingProcessor> add_export_point(/* Add some argument for placement later */);
|
2009-06-16 10:58:33 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
/** A record of the stream configuration at some point in the processor list.
|
|
|
|
* Used to return where and why an processor list configuration request failed.
|
|
|
|
*/
|
|
|
|
struct ProcessorStreams {
|
|
|
|
ProcessorStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {}
|
|
|
|
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
uint32_t index; ///< Index of processor where configuration failed
|
2008-06-02 17:41:35 -04:00
|
|
|
ChanCount count; ///< Input requested of processor
|
|
|
|
};
|
|
|
|
|
2011-04-14 20:28:29 -04:00
|
|
|
int add_processor (boost::shared_ptr<Processor>, Placement placement, ProcessorStreams* err = 0, bool activation_allowed = true);
|
2011-10-19 12:53:36 -04:00
|
|
|
int add_processor_by_index (boost::shared_ptr<Processor>, int, ProcessorStreams* err = 0, bool activation_allowed = true);
|
2012-01-30 13:09:54 -05:00
|
|
|
int add_processor (boost::shared_ptr<Processor>, boost::shared_ptr<Processor>, ProcessorStreams* err = 0, bool activation_allowed = true);
|
|
|
|
int add_processors (const ProcessorList&, boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
|
|
|
|
boost::shared_ptr<Processor> before_processor_for_placement (Placement);
|
|
|
|
boost::shared_ptr<Processor> before_processor_for_index (int);
|
2015-04-26 00:00:08 -04:00
|
|
|
bool processors_reorder_needs_configure (const ProcessorList& new_order);
|
2012-01-17 20:30:44 -05:00
|
|
|
int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0, bool need_process_lock = true);
|
2009-07-15 16:29:02 -04:00
|
|
|
int remove_processors (const ProcessorList&, ProcessorStreams* err = 0);
|
2009-07-12 20:26:28 -04:00
|
|
|
int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0);
|
2008-06-02 17:41:35 -04:00
|
|
|
void disable_processors (Placement);
|
|
|
|
void disable_processors ();
|
|
|
|
void disable_plugins (Placement);
|
|
|
|
void disable_plugins ();
|
|
|
|
void ab_plugins (bool forward);
|
|
|
|
void clear_processors (Placement);
|
2011-11-16 12:40:16 -05:00
|
|
|
void all_visible_processors_active (bool);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
framecnt_t set_private_port_latencies (bool playback) const;
|
|
|
|
void set_public_port_latencies (framecnt_t, bool playback) const;
|
2011-03-10 21:55:52 -05:00
|
|
|
|
|
|
|
framecnt_t update_signal_latency();
|
|
|
|
virtual void set_latency_compensation (framecnt_t);
|
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
void set_user_latency (framecnt_t);
|
|
|
|
framecnt_t initial_delay() const { return _initial_delay; }
|
2011-06-01 12:50:12 -04:00
|
|
|
framecnt_t signal_latency() const { return _signal_latency; }
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal0<void> active_changed;
|
|
|
|
PBD::Signal0<void> phase_invert_changed;
|
|
|
|
PBD::Signal0<void> denormal_protection_changed;
|
|
|
|
PBD::Signal1<void,void*> listen_changed;
|
2010-04-26 23:10:53 -04:00
|
|
|
PBD::Signal2<void,bool,void*> solo_changed;
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal1<void,void*> solo_safe_changed;
|
|
|
|
PBD::Signal1<void,void*> solo_isolated_changed;
|
|
|
|
PBD::Signal1<void,void*> comment_changed;
|
|
|
|
PBD::Signal1<void,void*> mute_changed;
|
|
|
|
PBD::Signal0<void> mute_points_changed;
|
2009-11-30 18:16:28 -05:00
|
|
|
|
2014-06-25 15:16:09 -04:00
|
|
|
/** track numbers - assigned by session
|
|
|
|
* nubers > 0 indicate tracks (audio+midi)
|
|
|
|
* nubers < 0 indicate busses
|
|
|
|
* zero is reserved for unnumbered special busses.
|
|
|
|
* */
|
|
|
|
PBD::Signal0<void> track_number_changed;
|
|
|
|
int64_t track_number() const { return _track_number; }
|
|
|
|
|
|
|
|
void set_track_number(int64_t tn) {
|
|
|
|
if (tn == _track_number) { return; }
|
|
|
|
_track_number = tn;
|
|
|
|
track_number_changed();
|
|
|
|
PropertyChanged (ARDOUR::Properties::name);
|
|
|
|
}
|
|
|
|
|
2009-11-30 18:16:28 -05:00
|
|
|
/** the processors have changed; the parameter indicates what changed */
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal1<void,RouteProcessorChange> processors_changed;
|
|
|
|
PBD::Signal1<void,void*> record_enable_changed;
|
2009-11-30 18:16:28 -05:00
|
|
|
/** the metering point has changed */
|
2011-06-01 12:50:12 -04:00
|
|
|
PBD::Signal0<void> meter_change;
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal0<void> signal_latency_changed;
|
|
|
|
PBD::Signal0<void> initial_delay_changed;
|
2010-11-25 18:46:24 -05:00
|
|
|
|
|
|
|
/** Emitted with the process lock held */
|
2010-08-13 17:33:01 -04:00
|
|
|
PBD::Signal0<void> io_changed;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
/* gui's call this for their own purposes. */
|
|
|
|
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal2<void,std::string,void*> gui_changed;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
/* stateful */
|
|
|
|
|
|
|
|
XMLNode& get_state();
|
2011-11-16 17:26:49 -05:00
|
|
|
virtual int set_state (const XMLNode&, int version);
|
2008-06-02 17:41:35 -04:00
|
|
|
virtual XMLNode& get_template();
|
|
|
|
|
|
|
|
XMLNode& get_processor_state ();
|
2009-06-09 16:21:19 -04:00
|
|
|
virtual void set_processor_state (const XMLNode&);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-03-02 11:52:40 -05:00
|
|
|
int save_as_template (const std::string& path, const std::string& name);
|
|
|
|
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal1<void,void*> SelectedChanged;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2012-01-30 13:09:54 -05:00
|
|
|
int add_aux_send (boost::shared_ptr<Route>, boost::shared_ptr<Processor>);
|
2012-01-18 12:51:57 -05:00
|
|
|
void remove_aux_or_listen (boost::shared_ptr<Route>);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
/**
|
|
|
|
* return true if this route feeds the first argument via at least one
|
|
|
|
* (arbitrarily long) signal pathway.
|
|
|
|
*/
|
|
|
|
bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
|
2010-04-26 23:10:53 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
/**
|
|
|
|
* return true if this route feeds the first argument directly, via
|
2011-11-09 12:44:39 -05:00
|
|
|
* either its main outs or a send. This is checked by the actual
|
|
|
|
* connections, rather than by what the graph is currently doing.
|
2011-06-01 12:50:12 -04:00
|
|
|
*/
|
2011-11-09 12:44:39 -05:00
|
|
|
bool direct_feeds_according_to_reality (boost::shared_ptr<Route>, bool* via_send_only = 0);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* return true if this route feeds the first argument directly, via
|
|
|
|
* either its main outs or a send, according to the graph that
|
|
|
|
* is currently being processed.
|
|
|
|
*/
|
|
|
|
bool direct_feeds_according_to_graph (boost::shared_ptr<Route>, bool* via_send_only = 0);
|
2010-04-26 23:10:53 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
struct FeedRecord {
|
|
|
|
boost::weak_ptr<Route> r;
|
|
|
|
bool sends_only;
|
2010-04-26 23:10:53 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
FeedRecord (boost::shared_ptr<Route> rp, bool sendsonly)
|
|
|
|
: r (rp)
|
|
|
|
, sends_only (sendsonly) {}
|
|
|
|
};
|
2010-04-26 23:10:53 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
struct FeedRecordCompare {
|
|
|
|
bool operator() (const FeedRecord& a, const FeedRecord& b) const {
|
|
|
|
return a.r < b.r;
|
|
|
|
}
|
|
|
|
};
|
2010-04-26 23:10:53 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
typedef std::set<FeedRecord,FeedRecordCompare> FedBy;
|
2010-04-26 23:10:53 -04:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
const FedBy& fed_by() const { return _fed_by; }
|
|
|
|
void clear_fed_by ();
|
|
|
|
bool add_fed_by (boost::shared_ptr<Route>, bool sends_only);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
/* Controls (not all directly owned by the Route */
|
|
|
|
|
|
|
|
boost::shared_ptr<AutomationControl> get_control (const Evoral::Parameter& param);
|
|
|
|
|
2011-02-22 16:15:42 -05:00
|
|
|
class SoloControllable : public AutomationControl {
|
|
|
|
public:
|
|
|
|
SoloControllable (std::string name, boost::shared_ptr<Route>);
|
2010-07-27 10:09:16 -04:00
|
|
|
void set_value (double);
|
2011-02-22 16:15:42 -05:00
|
|
|
double get_value () const;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2011-02-22 16:15:42 -05:00
|
|
|
private:
|
|
|
|
boost::weak_ptr<Route> _route;
|
2008-06-02 17:41:35 -04:00
|
|
|
};
|
|
|
|
|
2010-01-04 13:15:29 -05:00
|
|
|
struct MuteControllable : public AutomationControl {
|
2011-02-22 16:15:42 -05:00
|
|
|
public:
|
|
|
|
MuteControllable (std::string name, boost::shared_ptr<Route>);
|
2010-07-27 10:09:16 -04:00
|
|
|
void set_value (double);
|
2011-02-22 16:15:42 -05:00
|
|
|
double get_value () const;
|
2010-01-04 13:15:29 -05:00
|
|
|
|
2014-12-18 02:25:17 -05:00
|
|
|
/* Pretend to change value, but do not affect actual route mute. */
|
|
|
|
void set_superficial_value(bool muted);
|
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
private:
|
2011-02-22 16:15:42 -05:00
|
|
|
boost::weak_ptr<Route> _route;
|
2010-01-04 13:15:29 -05:00
|
|
|
};
|
|
|
|
|
2014-12-18 02:25:17 -05:00
|
|
|
boost::shared_ptr<SoloControllable> solo_control() const {
|
2008-06-02 17:41:35 -04:00
|
|
|
return _solo_control;
|
|
|
|
}
|
|
|
|
|
2014-12-18 02:25:17 -05:00
|
|
|
boost::shared_ptr<MuteControllable> mute_control() const {
|
2010-01-04 13:15:29 -05:00
|
|
|
return _mute_control;
|
2008-06-02 17:41:35 -04:00
|
|
|
}
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
boost::shared_ptr<MuteMaster> mute_master() const {
|
|
|
|
return _mute_master;
|
2009-06-09 16:21:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Route doesn't own these items, but sub-objects that it does own have them
|
|
|
|
and to make UI code a bit simpler, we provide direct access to them
|
|
|
|
here.
|
|
|
|
*/
|
|
|
|
|
2011-01-26 20:31:03 -05:00
|
|
|
boost::shared_ptr<Panner> panner() const; /* may return null */
|
|
|
|
boost::shared_ptr<PannerShell> panner_shell() const;
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<AutomationControl> gain_control() const;
|
2011-06-01 12:50:12 -04:00
|
|
|
boost::shared_ptr<Pannable> pannable() const;
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2012-04-18 20:30:55 -04:00
|
|
|
/**
|
|
|
|
Return the first processor that accepts has at least one MIDI input
|
|
|
|
and at least one audio output. In the vast majority of cases, this
|
|
|
|
will be "the instrument". This does not preclude other MIDI->audio
|
|
|
|
processors later in the processing chain, but that would be a
|
|
|
|
special case not covered by this utility function.
|
|
|
|
*/
|
|
|
|
boost::shared_ptr<Processor> the_instrument() const;
|
2012-06-11 08:07:17 -04:00
|
|
|
InstrumentInfo& instrument_info() { return _instrument_info; }
|
2012-04-18 20:30:55 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
void protect_automation ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2015-10-04 14:51:05 -04:00
|
|
|
enum {
|
2012-01-17 20:30:44 -05:00
|
|
|
/* These numbers are taken from MIDI Machine Control,
|
|
|
|
which can only control up to 317 tracks without
|
|
|
|
doing sysex segmentation.
|
|
|
|
*/
|
|
|
|
MasterBusRemoteControlID = 318,
|
|
|
|
MonitorBusRemoteControlID = 319,
|
|
|
|
};
|
|
|
|
|
2012-06-25 08:46:13 -04:00
|
|
|
void set_remote_control_id (uint32_t id, bool notify_class_listeners = true);
|
2008-06-02 17:41:35 -04:00
|
|
|
uint32_t remote_control_id () const;
|
2013-10-20 09:19:43 -04:00
|
|
|
void set_remote_control_id_explicit (uint32_t order_key);
|
2009-12-30 07:41:10 -05:00
|
|
|
|
|
|
|
/* for things concerned about *this* route's RID */
|
|
|
|
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::Signal0<void> RemoteControlIDChanged;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2012-06-25 08:46:13 -04:00
|
|
|
/* for things concerned about *any* route's RID changes */
|
2009-12-30 07:41:10 -05:00
|
|
|
|
|
|
|
static PBD::Signal0<void> RemoteControlIDChange;
|
2013-10-20 09:19:43 -04:00
|
|
|
static PBD::Signal0<void> SyncOrderKeys;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2012-03-16 12:51:54 -04:00
|
|
|
bool has_external_redirects() const;
|
|
|
|
|
2013-03-27 21:50:18 -04:00
|
|
|
/* can only be executed by a route for which is_monitor() is true
|
|
|
|
(i.e. the monitor out)
|
|
|
|
*/
|
|
|
|
void monitor_run (framepos_t start_frame, framepos_t end_frame,
|
|
|
|
pframes_t nframes, int declick);
|
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
protected:
|
|
|
|
friend class Session;
|
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
void catch_up_on_solo_mute_override ();
|
2010-05-01 11:09:19 -04:00
|
|
|
void mod_solo_by_others_upstream (int32_t);
|
|
|
|
void mod_solo_by_others_downstream (int32_t);
|
2008-06-02 17:41:35 -04:00
|
|
|
void curve_reallocate ();
|
2010-12-03 17:26:29 -05:00
|
|
|
virtual void set_block_size (pframes_t nframes);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
protected:
|
2012-04-14 18:04:51 -04:00
|
|
|
virtual framecnt_t check_initial_delay (framecnt_t nframes, framepos_t&) { return nframes; }
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2013-03-27 21:50:18 -04:00
|
|
|
void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
|
|
|
|
|
|
|
|
void passthru (BufferSet&, framepos_t start_frame, framepos_t end_frame,
|
2010-12-03 17:26:29 -05:00
|
|
|
pframes_t nframes, int declick);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
virtual void write_out_of_band_data (BufferSet& /* bufs */, framepos_t /* start_frame */, framepos_t /* end_frame */,
|
2013-03-27 21:50:18 -04:00
|
|
|
framecnt_t /* nframes */) {}
|
2009-08-26 23:09:30 -04:00
|
|
|
|
2009-02-16 21:11:49 -05:00
|
|
|
virtual void process_output_buffers (BufferSet& bufs,
|
2011-06-01 12:50:12 -04:00
|
|
|
framepos_t start_frame, framepos_t end_frame,
|
2011-11-20 20:28:27 -05:00
|
|
|
pframes_t nframes, int declick,
|
2011-06-01 12:50:12 -04:00
|
|
|
bool gain_automation_ok);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2014-05-25 13:43:37 -04:00
|
|
|
virtual void bounce_process (BufferSet& bufs,
|
|
|
|
framepos_t start_frame, framecnt_t nframes,
|
|
|
|
boost::shared_ptr<Processor> endpoint, bool include_endpoint,
|
2014-06-03 15:08:45 -04:00
|
|
|
bool for_export, bool for_freeze);
|
2014-05-25 13:43:37 -04:00
|
|
|
|
2014-06-03 15:08:45 -04:00
|
|
|
framecnt_t bounce_get_latency (boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) const;
|
|
|
|
ChanCount bounce_get_output_streams (ChanCount &cc, boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) const;
|
2014-05-25 13:43:37 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<IO> _input;
|
|
|
|
boost::shared_ptr<IO> _output;
|
2009-02-16 21:11:49 -05:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
bool _active;
|
2011-06-01 12:50:12 -04:00
|
|
|
framecnt_t _signal_latency;
|
2014-06-15 10:21:09 -04:00
|
|
|
framecnt_t _signal_latency_at_amp_position;
|
2015-04-25 15:24:58 -04:00
|
|
|
framecnt_t _signal_latency_at_trim_position;
|
2010-12-03 17:26:29 -05:00
|
|
|
framecnt_t _initial_delay;
|
|
|
|
framecnt_t _roll_delay;
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2009-02-16 21:11:49 -05:00
|
|
|
ProcessorList _processors;
|
2012-07-25 13:48:55 -04:00
|
|
|
mutable Glib::Threads::RWLock _processor_lock;
|
2009-05-13 17:34:09 -04:00
|
|
|
boost::shared_ptr<Delivery> _main_outs;
|
2011-06-14 15:00:08 -04:00
|
|
|
boost::shared_ptr<InternalSend> _monitor_send;
|
2009-06-16 10:58:33 -04:00
|
|
|
boost::shared_ptr<InternalReturn> _intreturn;
|
2010-03-10 12:31:16 -05:00
|
|
|
boost::shared_ptr<MonitorProcessor> _monitor_control;
|
2011-06-01 12:50:12 -04:00
|
|
|
boost::shared_ptr<Pannable> _pannable;
|
2009-02-16 21:11:49 -05:00
|
|
|
|
2015-04-28 16:18:30 -04:00
|
|
|
enum {
|
|
|
|
EmitNone = 0x00,
|
|
|
|
EmitMeterChanged = 0x01,
|
|
|
|
EmitMeterVisibilityChange = 0x02,
|
|
|
|
EmitRtProcessorChange = 0x04
|
|
|
|
};
|
|
|
|
|
2015-04-26 22:52:14 -04:00
|
|
|
ProcessorList _pending_processor_order;
|
|
|
|
gint _pending_process_reorder; // atomic
|
2015-04-28 16:18:30 -04:00
|
|
|
gint _pending_signals; // atomic
|
2015-04-26 22:52:14 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
Flag _flags;
|
|
|
|
int _pending_declick;
|
|
|
|
MeterPoint _meter_point;
|
2015-04-26 00:00:08 -04:00
|
|
|
MeterPoint _pending_meter_point;
|
2013-07-07 08:39:26 -04:00
|
|
|
MeterType _meter_type;
|
2010-08-13 17:33:01 -04:00
|
|
|
boost::dynamic_bitset<> _phase_invert;
|
2009-11-21 12:20:57 -05:00
|
|
|
bool _self_solo;
|
2010-05-01 11:09:19 -04:00
|
|
|
uint32_t _soloed_by_others_upstream;
|
|
|
|
uint32_t _soloed_by_others_downstream;
|
2015-08-10 18:14:08 -04:00
|
|
|
bool _solo_isolated;
|
2015-07-13 15:26:59 -04:00
|
|
|
uint32_t _solo_isolated_by_upstream;
|
2009-06-17 11:50:29 -04:00
|
|
|
|
2015-07-13 15:26:59 -04:00
|
|
|
void mod_solo_isolated_by_upstream (bool, void*);
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
bool _denormal_protection;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-02-16 21:11:49 -05:00
|
|
|
bool _recordable : 1;
|
|
|
|
bool _silent : 1;
|
|
|
|
bool _declickable : 1;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<SoloControllable> _solo_control;
|
2010-01-04 13:15:29 -05:00
|
|
|
boost::shared_ptr<MuteControllable> _mute_control;
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<MuteMaster> _mute_master;
|
2011-06-01 12:50:12 -04:00
|
|
|
|
2011-12-14 12:17:30 -05:00
|
|
|
virtual void act_on_mute () {}
|
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
std::string _comment;
|
|
|
|
bool _have_internal_generator;
|
|
|
|
bool _solo_safe;
|
|
|
|
DataType _default_type;
|
2011-06-01 12:50:12 -04:00
|
|
|
FedBy _fed_by;
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2012-06-11 08:07:17 -04:00
|
|
|
InstrumentInfo _instrument_info;
|
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
virtual ChanCount input_streams () const;
|
2010-03-24 08:55:04 -04:00
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
protected:
|
|
|
|
virtual XMLNode& state(bool);
|
|
|
|
|
2010-03-24 23:40:07 -04:00
|
|
|
int configure_processors (ProcessorStreams*);
|
|
|
|
|
2010-09-17 14:20:37 -04:00
|
|
|
void passthru_silence (framepos_t start_frame, framepos_t end_frame,
|
2010-12-03 17:26:29 -05:00
|
|
|
pframes_t nframes, int declick);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
void silence (framecnt_t);
|
|
|
|
void silence_unlocked (framecnt_t);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-05-04 11:50:51 -04:00
|
|
|
ChanCount processor_max_streams;
|
2013-08-02 17:02:13 -04:00
|
|
|
ChanCount processor_out_streams;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
uint32_t pans_required() const;
|
|
|
|
ChanCount n_process_buffers ();
|
2011-03-05 18:16:32 -05:00
|
|
|
|
2011-06-01 12:50:12 -04:00
|
|
|
virtual void maybe_declick (BufferSet&, framecnt_t, int);
|
2011-03-05 18:16:32 -05:00
|
|
|
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<Amp> _amp;
|
2015-04-24 15:45:53 -04:00
|
|
|
boost::shared_ptr<Amp> _trim;
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<PeakMeter> _meter;
|
2014-06-11 11:14:18 -04:00
|
|
|
boost::shared_ptr<DelayLine> _delayline;
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2012-12-18 20:20:37 -05:00
|
|
|
boost::shared_ptr<Processor> the_instrument_unlocked() const;
|
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
private:
|
2011-11-16 17:26:49 -05:00
|
|
|
int set_state_2X (const XMLNode&, int);
|
2009-10-14 20:57:55 -04:00
|
|
|
void set_processor_state_2X (XMLNodeList const &, int);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2013-10-20 09:19:43 -04:00
|
|
|
uint32_t _order_key;
|
|
|
|
bool _has_order_key;
|
2012-06-28 18:27:37 -04:00
|
|
|
uint32_t _remote_control_id;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2014-06-25 15:16:09 -04:00
|
|
|
int64_t _track_number;
|
|
|
|
|
2008-06-02 17:41:35 -04:00
|
|
|
void input_change_handler (IOChange, void *src);
|
|
|
|
void output_change_handler (IOChange, void *src);
|
|
|
|
|
2010-11-25 18:46:24 -05:00
|
|
|
bool input_port_count_changing (ChanCount);
|
2013-08-02 17:02:13 -04:00
|
|
|
bool output_port_count_changing (ChanCount);
|
2010-11-25 18:46:24 -05:00
|
|
|
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
bool _in_configure_processors;
|
2013-08-02 18:50:09 -04:00
|
|
|
bool _initial_io_setup;
|
2008-06-02 17:41:35 -04:00
|
|
|
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
int configure_processors_unlocked (ProcessorStreams*);
|
2015-04-28 16:18:30 -04:00
|
|
|
bool set_meter_point_unlocked ();
|
2015-04-26 22:52:14 -04:00
|
|
|
void apply_processor_order (const ProcessorList& new_order);
|
2015-04-26 00:00:08 -04:00
|
|
|
|
2010-11-25 18:46:24 -05:00
|
|
|
std::list<std::pair<ChanCount, ChanCount> > try_configure_processors (ChanCount, ProcessorStreams *);
|
|
|
|
std::list<std::pair<ChanCount, ChanCount> > try_configure_processors_unlocked (ChanCount, ProcessorStreams *);
|
2009-06-09 16:21:19 -04:00
|
|
|
|
2010-09-03 11:34:09 -04:00
|
|
|
bool add_processor_from_xml_2X (const XMLNode&, int);
|
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07 02:30:50 -04:00
|
|
|
|
2009-05-15 22:51:17 -04:00
|
|
|
void placement_range (Placement p, ProcessorList::iterator& start, ProcessorList::iterator& end);
|
2009-11-21 12:20:57 -05:00
|
|
|
|
|
|
|
void set_self_solo (bool yn);
|
2010-04-27 21:29:06 -04:00
|
|
|
void set_mute_master_solo ();
|
2010-05-17 19:28:13 -04:00
|
|
|
|
|
|
|
void set_processor_positions ();
|
2011-06-01 12:50:12 -04:00
|
|
|
framecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, framecnt_t) const;
|
2011-02-19 19:55:32 -05:00
|
|
|
|
|
|
|
void setup_invisible_processors ();
|
2011-06-14 10:49:06 -04:00
|
|
|
void unpan ();
|
2011-02-19 19:55:32 -05:00
|
|
|
|
|
|
|
boost::shared_ptr<CapturingProcessor> _capturing_processor;
|
|
|
|
|
|
|
|
/** A handy class to keep processor state while we attempt a reconfiguration
|
|
|
|
* that may fail.
|
|
|
|
*/
|
|
|
|
class ProcessorState {
|
|
|
|
public:
|
|
|
|
ProcessorState (Route* r)
|
|
|
|
: _route (r)
|
|
|
|
, _processors (r->_processors)
|
|
|
|
, _processor_max_streams (r->processor_max_streams)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
void restore () {
|
|
|
|
_route->_processors = _processors;
|
|
|
|
_route->processor_max_streams = _processor_max_streams;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
/* this should perhaps be a shared_ptr, but ProcessorStates will
|
|
|
|
not hang around long enough for it to matter.
|
|
|
|
*/
|
|
|
|
Route* _route;
|
|
|
|
ProcessorList _processors;
|
|
|
|
ChanCount _processor_max_streams;
|
|
|
|
};
|
|
|
|
|
|
|
|
friend class ProcessorState;
|
|
|
|
|
|
|
|
/* no copy construction */
|
|
|
|
Route (Route const &);
|
2011-11-15 19:57:57 -05:00
|
|
|
|
|
|
|
void maybe_note_meter_position ();
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2011-11-15 19:57:57 -05:00
|
|
|
/** true if we've made a note of a custom meter position in these variables */
|
|
|
|
bool _custom_meter_position_noted;
|
|
|
|
/** the processor that came after the meter when it was last set to a custom position,
|
|
|
|
or 0.
|
|
|
|
*/
|
|
|
|
boost::weak_ptr<Processor> _processor_after_last_custom_meter;
|
2012-06-11 18:59:35 -04:00
|
|
|
|
|
|
|
void reset_instrument_info ();
|
2012-11-21 14:56:55 -05:00
|
|
|
|
|
|
|
void set_remote_control_id_internal (uint32_t id, bool notify_class_listeners = true);
|
2008-06-02 17:41:35 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ARDOUR
|
|
|
|
|
|
|
|
#endif /* __ardour_route_h__ */
|