mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
processor naming tweaks, processor visibility tweaks and more, trying to finish this audio routing thing...
git-svn-id: svn://localhost/ardour2/branches/3.0@5364 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f01af9836e
commit
4944514034
17 changed files with 172 additions and 156 deletions
|
|
@ -46,6 +46,7 @@
|
||||||
#include "ardour/audio_diskstream.h"
|
#include "ardour/audio_diskstream.h"
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
|
#include "ardour/internal_send.h"
|
||||||
#include "ardour/ladspa_plugin.h"
|
#include "ardour/ladspa_plugin.h"
|
||||||
#include "ardour/meter.h"
|
#include "ardour/meter.h"
|
||||||
#include "ardour/plugin_insert.h"
|
#include "ardour/plugin_insert.h"
|
||||||
|
|
@ -768,11 +769,9 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
if (!processor->visible()) {
|
||||||
if (processor == _route->amp() || !processor->visible()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
Gtk::TreeModel::Row row = *(model->append());
|
Gtk::TreeModel::Row row = *(model->append());
|
||||||
row[columns.text] = processor_name (processor);
|
row[columns.text] = processor_name (processor);
|
||||||
|
|
@ -804,7 +803,8 @@ ProcessorBox::processor_name (boost::weak_ptr<Processor> weak_processor)
|
||||||
name_display = " (";
|
name_display = " (";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((send = boost::dynamic_pointer_cast<Send> (processor)) != 0) {
|
if ((send = boost::dynamic_pointer_cast<Send> (processor)) != 0 &&
|
||||||
|
!boost::dynamic_pointer_cast<InternalSend>(processor)) {
|
||||||
|
|
||||||
name_display += '>';
|
name_display += '>';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -526,7 +526,8 @@ RouteUI::build_sends_menu ()
|
||||||
sends_menu->set_name ("ArdourContextMenu");
|
sends_menu->set_name ("ArdourContextMenu");
|
||||||
MenuList& items = sends_menu->items();
|
MenuList& items = sends_menu->items();
|
||||||
|
|
||||||
items.push_back (MenuElem(_("Assign all tracks"), mem_fun (*this, &RouteUI::create_sends)));
|
items.push_back (MenuElem(_("Assign all tracks (prefader)"), bind (mem_fun (*this, &RouteUI::create_sends), PreFader)));
|
||||||
|
items.push_back (MenuElem(_("Assign all tracks (postfader)"), bind (mem_fun (*this, &RouteUI::create_sends), PostFader)));
|
||||||
items.push_back (MenuElem(_("Copy track gains to sends"), mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
|
items.push_back (MenuElem(_("Copy track gains to sends"), mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
|
||||||
items.push_back (MenuElem(_("Set sends gain to -inf"), mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
|
items.push_back (MenuElem(_("Set sends gain to -inf"), mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
|
||||||
items.push_back (MenuElem(_("Set sends gain to 0dB"), mem_fun (*this, &RouteUI::set_sends_gain_to_unity)));
|
items.push_back (MenuElem(_("Set sends gain to 0dB"), mem_fun (*this, &RouteUI::set_sends_gain_to_unity)));
|
||||||
|
|
@ -534,9 +535,9 @@ RouteUI::build_sends_menu ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::create_sends ()
|
RouteUI::create_sends (Placement p)
|
||||||
{
|
{
|
||||||
_session.globally_add_internal_sends (_route);
|
_session.globally_add_internal_sends (_route, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ class RouteUI : public virtual AxisView
|
||||||
void set_sends_gain_from_track ();
|
void set_sends_gain_from_track ();
|
||||||
void set_sends_gain_to_zero ();
|
void set_sends_gain_to_zero ();
|
||||||
void set_sends_gain_to_unity ();
|
void set_sends_gain_to_unity ();
|
||||||
void create_sends ();
|
void create_sends (ARDOUR::Placement);
|
||||||
|
|
||||||
void solo_changed(void*);
|
void solo_changed(void*);
|
||||||
void solo_changed_so_update_mute ();
|
void solo_changed_so_update_mute ();
|
||||||
|
|
|
||||||
|
|
@ -323,3 +323,9 @@ Amp::setup_gain_automation (sframes_t start_frame, sframes_t end_frame, nframes_
|
||||||
_apply_gain_automation = false;
|
_apply_gain_automation = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Amp::visible() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public:
|
||||||
|
|
||||||
std::string display_name() const;
|
std::string display_name() const;
|
||||||
|
|
||||||
bool visible () const { return false; }
|
bool visible () const;
|
||||||
|
|
||||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
||||||
bool configure_io (ChanCount in, ChanCount out);
|
bool configure_io (ChanCount in, ChanCount out);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ public:
|
||||||
Insert = 0x1,
|
Insert = 0x1,
|
||||||
Send = 0x2,
|
Send = 0x2,
|
||||||
Listen = 0x4,
|
Listen = 0x4,
|
||||||
Main = 0x8
|
Main = 0x8,
|
||||||
|
Aux = 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Delivery to an existing output */
|
/* Delivery to an existing output */
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,11 @@ namespace ARDOUR {
|
||||||
class InternalSend : public Send
|
class InternalSend : public Send
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InternalSend (Session&, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to);
|
InternalSend (Session&, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role);
|
||||||
InternalSend (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&);
|
InternalSend (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&);
|
||||||
virtual ~InternalSend ();
|
virtual ~InternalSend ();
|
||||||
|
|
||||||
|
std::string display_name() const;
|
||||||
bool set_name (const std::string&);
|
bool set_name (const std::string&);
|
||||||
bool visible() const;
|
bool visible() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ public:
|
||||||
PeakMeter(Session& s) : Processor(s, "Meter") {}
|
PeakMeter(Session& s) : Processor(s, "Meter") {}
|
||||||
PeakMeter(Session&s, const XMLNode& node);
|
PeakMeter(Session&s, const XMLNode& node);
|
||||||
|
|
||||||
|
bool visible() const;
|
||||||
|
|
||||||
void meter();
|
void meter();
|
||||||
|
|
||||||
void reset ();
|
void reset ();
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ class Route : public SessionObject, public AutomatableControls
|
||||||
|
|
||||||
sigc::signal<void,void*> SelectedChanged;
|
sigc::signal<void,void*> SelectedChanged;
|
||||||
|
|
||||||
int listen_via (boost::shared_ptr<Route>, bool);
|
int listen_via (boost::shared_ptr<Route>, Placement p, bool active, bool aux);
|
||||||
void drop_listen (boost::shared_ptr<Route>);
|
void drop_listen (boost::shared_ptr<Route>);
|
||||||
|
|
||||||
bool feeds (boost::shared_ptr<Route>);
|
bool feeds (boost::shared_ptr<Route>);
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,14 @@ class Amp;
|
||||||
class Send : public Delivery
|
class Send : public Delivery
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Send (Session&, boost::shared_ptr<MuteMaster>, bool internal = false);
|
Send (Session&, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send);
|
||||||
Send (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&, bool internal = false);
|
Send (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&, Delivery::Role r = Delivery::Send);
|
||||||
virtual ~Send ();
|
virtual ~Send ();
|
||||||
|
|
||||||
uint32_t bit_slot() const { return _bitslot; }
|
uint32_t bit_slot() const { return _bitslot; }
|
||||||
|
|
||||||
|
bool visible() const;
|
||||||
|
|
||||||
boost::shared_ptr<Amp> amp() const { return _amp; }
|
boost::shared_ptr<Amp> amp() const { return _amp; }
|
||||||
boost::shared_ptr<PeakMeter> meter() const { return _meter; }
|
boost::shared_ptr<PeakMeter> meter() const { return _meter; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -740,8 +740,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
boost::shared_ptr<Route> control_out() const { return _control_out; }
|
boost::shared_ptr<Route> control_out() const { return _control_out; }
|
||||||
boost::shared_ptr<Route> master_out() const { return _master_out; }
|
boost::shared_ptr<Route> master_out() const { return _master_out; }
|
||||||
|
|
||||||
void globally_add_internal_sends (boost::shared_ptr<Route> dest);
|
void globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p);
|
||||||
void add_internal_sends (boost::shared_ptr<Route> dest, boost::shared_ptr<RouteList> senders);
|
void add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::shared_ptr<RouteList> senders);
|
||||||
|
|
||||||
static void set_disable_all_loaded_plugins (bool yn) {
|
static void set_disable_all_loaded_plugins (bool yn) {
|
||||||
_disable_all_loaded_plugins = yn;
|
_disable_all_loaded_plugins = yn;
|
||||||
|
|
|
||||||
|
|
@ -178,10 +178,6 @@ Delivery::increment_output_offset (nframes_t n)
|
||||||
bool
|
bool
|
||||||
Delivery::visible () const
|
Delivery::visible () const
|
||||||
{
|
{
|
||||||
if (_role & Main) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto)
|
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role)
|
||||||
: Send (s, mm, true)
|
: Send (s, mm, role)
|
||||||
, _send_to (sendto)
|
, _send_to (sendto)
|
||||||
{
|
{
|
||||||
if ((target = _send_to->get_return_buffer ()) == 0) {
|
if ((target = _send_to->get_return_buffer ()) == 0) {
|
||||||
|
|
@ -42,12 +42,12 @@ InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost:
|
||||||
}
|
}
|
||||||
|
|
||||||
set_name (sendto->name());
|
set_name (sendto->name());
|
||||||
|
|
||||||
_send_to->GoingAway.connect (mem_fun (*this, &InternalSend::send_to_going_away));
|
_send_to->GoingAway.connect (mem_fun (*this, &InternalSend::send_to_going_away));
|
||||||
}
|
}
|
||||||
|
|
||||||
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
|
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
|
||||||
: Send (s, mm, node, true)
|
: Send (s, mm, node, Delivery::Aux /* will be reset in set_state() */)
|
||||||
{
|
{
|
||||||
set_state (node);
|
set_state (node);
|
||||||
}
|
}
|
||||||
|
|
@ -223,8 +223,22 @@ InternalSend::set_name (const std::string& str)
|
||||||
return IOProcessor::set_name (str);
|
return IOProcessor::set_name (str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
InternalSend::display_name () const
|
||||||
|
{
|
||||||
|
if (_role == Aux) {
|
||||||
|
return string_compose (X_("aux-%1"), _name);
|
||||||
|
} else {
|
||||||
|
return _name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
InternalSend::visible () const
|
InternalSend::visible () const
|
||||||
{
|
{
|
||||||
|
if (_role == Aux) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,3 +218,9 @@ PeakMeter::state (bool full_state)
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
PeakMeter::visible() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -619,22 +619,10 @@ Route::add_processor (boost::shared_ptr<Processor> processor, Placement placemen
|
||||||
|
|
||||||
if (placement == PreFader) {
|
if (placement == PreFader) {
|
||||||
/* generic pre-fader: insert immediately before the amp */
|
/* generic pre-fader: insert immediately before the amp */
|
||||||
loc = find(_processors.begin(), _processors.end(), _amp);
|
loc = find (_processors.begin(), _processors.end(), _amp);
|
||||||
} else {
|
} else {
|
||||||
/* generic post-fader: insert at end */
|
/* generic post-fader: insert right before the main outs */
|
||||||
loc = _processors.end();
|
loc = find (_processors.begin(), _processors.end(), _main_outs);
|
||||||
|
|
||||||
if (processor->visible() && !_processors.empty()) {
|
|
||||||
/* check for invisible processors stacked at the end and leave them there */
|
|
||||||
ProcessorList::iterator p;
|
|
||||||
p = _processors.end();
|
|
||||||
--p;
|
|
||||||
while (!(*p)->visible() && p != _processors.begin()) {
|
|
||||||
--p;
|
|
||||||
}
|
|
||||||
++p;
|
|
||||||
loc = p;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return add_processor (processor, loc, err);
|
return add_processor (processor, loc, err);
|
||||||
|
|
@ -725,129 +713,116 @@ Route::add_processor_from_xml (const XMLNode& node, ProcessorList::iterator iter
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
|
|
||||||
// legacy sessions use a different node name for sends
|
if (node.name() != "Processor") {
|
||||||
if (node.name() == "Send") {
|
return false;
|
||||||
|
}
|
||||||
try {
|
|
||||||
boost::shared_ptr<Send> send (new Send (_session, _mute_master, node));
|
|
||||||
add_processor (send, iter);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (failed_constructor &err) {
|
try {
|
||||||
error << _("Send construction failed") << endmsg;
|
if ((prop = node.property ("type")) != 0) {
|
||||||
return false;
|
|
||||||
}
|
boost::shared_ptr<Processor> processor;
|
||||||
|
|
||||||
} else if (node.name() == "Processor") {
|
|
||||||
|
|
||||||
try {
|
|
||||||
if ((prop = node.property ("type")) != 0) {
|
|
||||||
|
|
||||||
boost::shared_ptr<Processor> processor;
|
if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
|
||||||
|
prop->value() == "lv2" ||
|
||||||
if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
|
prop->value() == "vst" ||
|
||||||
prop->value() == "lv2" ||
|
prop->value() == "audiounit") {
|
||||||
prop->value() == "vst" ||
|
|
||||||
prop->value() == "audiounit") {
|
|
||||||
|
|
||||||
processor.reset (new PluginInsert(_session, node));
|
processor.reset (new PluginInsert(_session, node));
|
||||||
|
|
||||||
} else if (prop->value() == "port") {
|
} else if (prop->value() == "port") {
|
||||||
|
|
||||||
processor.reset (new PortInsert (_session, _mute_master, node));
|
processor.reset (new PortInsert (_session, _mute_master, node));
|
||||||
|
|
||||||
} else if (prop->value() == "send") {
|
} else if (prop->value() == "send") {
|
||||||
|
|
||||||
processor.reset (new Send (_session, _mute_master, node));
|
processor.reset (new Send (_session, _mute_master, node));
|
||||||
|
|
||||||
} else if (prop->value() == "meter") {
|
} else if (prop->value() == "meter") {
|
||||||
|
|
||||||
if (_meter) {
|
if (_meter) {
|
||||||
if (_meter->set_state (node)) {
|
if (_meter->set_state (node)) {
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_meter.reset (new PeakMeter (_session, node));
|
|
||||||
processor = _meter;
|
|
||||||
|
|
||||||
} else if (prop->value() == "amp") {
|
|
||||||
|
|
||||||
/* amp always exists */
|
|
||||||
|
|
||||||
processor = _amp;
|
|
||||||
if (processor->set_state (node)) {
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
/* never any reason to add it */
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_meter.reset (new PeakMeter (_session, node));
|
||||||
|
processor = _meter;
|
||||||
|
|
||||||
|
} else if (prop->value() == "amp") {
|
||||||
|
|
||||||
|
/* amp always exists */
|
||||||
|
|
||||||
} else if (prop->value() == "listen" || prop->value() == "deliver") {
|
processor = _amp;
|
||||||
|
if (processor->set_state (node)) {
|
||||||
/* XXX need to generalize */
|
return false;
|
||||||
|
|
||||||
} else if (prop->value() == "intsend") {
|
|
||||||
|
|
||||||
processor.reset (new InternalSend (_session, _mute_master, node));
|
|
||||||
|
|
||||||
} else if (prop->value() == "intreturn") {
|
|
||||||
|
|
||||||
if (_intreturn) {
|
|
||||||
if (_intreturn->set_state (node)) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_intreturn.reset (new InternalReturn (_session, node));
|
|
||||||
processor = _intreturn;
|
|
||||||
|
|
||||||
} else if (prop->value() == "main-outs") {
|
|
||||||
|
|
||||||
if (_main_outs) {
|
|
||||||
if (_main_outs->set_state (node)) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_main_outs.reset (new Delivery (_session, _output, _mute_master, node));
|
|
||||||
processor = _main_outs;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
error << string_compose(_("unknown Processor type \"%1\"; ignored"), prop->value()) << endmsg;
|
/* never any reason to add it */
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iter == _processors.end() && processor->visible() && !_processors.empty()) {
|
} else if (prop->value() == "listen" || prop->value() == "deliver") {
|
||||||
/* check for invisible processors stacked at the end and leave them there */
|
|
||||||
ProcessorList::iterator p;
|
/* XXX need to generalize */
|
||||||
p = _processors.end();
|
|
||||||
--p;
|
} else if (prop->value() == "intsend") {
|
||||||
while (!(*p)->visible() && p != _processors.begin()) {
|
|
||||||
--p;
|
processor.reset (new InternalSend (_session, _mute_master, node));
|
||||||
|
|
||||||
|
} else if (prop->value() == "intreturn") {
|
||||||
|
|
||||||
|
if (_intreturn) {
|
||||||
|
if (_intreturn->set_state (node)) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_intreturn.reset (new InternalReturn (_session, node));
|
||||||
|
processor = _intreturn;
|
||||||
|
|
||||||
|
} else if (prop->value() == "main-outs") {
|
||||||
|
|
||||||
|
if (_main_outs) {
|
||||||
|
if (_main_outs->set_state (node)) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
++p;
|
|
||||||
iter = p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (add_processor (processor, iter) == 0);
|
_main_outs.reset (new Delivery (_session, _output, _mute_master, node));
|
||||||
|
processor = _main_outs;
|
||||||
} else {
|
|
||||||
error << _("Processor XML node has no type property") << endmsg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (failed_constructor &err) {
|
} else {
|
||||||
warning << _("processor could not be created. Ignored.") << endmsg;
|
error << string_compose(_("unknown Processor type \"%1\"; ignored"), prop->value()) << endmsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iter == _processors.end() && processor->visible() && !_processors.empty()) {
|
||||||
|
/* check for invisible processors stacked at the end and leave them there */
|
||||||
|
ProcessorList::iterator p;
|
||||||
|
p = _processors.end();
|
||||||
|
--p;
|
||||||
|
while (!(*p)->visible() && p != _processors.begin()) {
|
||||||
|
--p;
|
||||||
|
}
|
||||||
|
++p;
|
||||||
|
iter = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (add_processor (processor, iter) == 0);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
error << _("Processor XML node has no type property") << endmsg;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
catch (failed_constructor &err) {
|
||||||
|
warning << _("processor could not be created. Ignored.") << endmsg;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -1885,7 +1860,7 @@ Route::release_return_buffer () const
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Route::listen_via (boost::shared_ptr<Route> route, bool active)
|
Route::listen_via (boost::shared_ptr<Route> route, Placement placement, bool active, bool aux)
|
||||||
{
|
{
|
||||||
vector<string> ports;
|
vector<string> ports;
|
||||||
vector<string>::const_iterator i;
|
vector<string>::const_iterator i;
|
||||||
|
|
@ -1917,7 +1892,7 @@ Route::listen_via (boost::shared_ptr<Route> route, bool active)
|
||||||
boost::shared_ptr<InternalSend> listener;
|
boost::shared_ptr<InternalSend> listener;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
listener.reset (new InternalSend (_session, _mute_master, route));
|
listener.reset (new InternalSend (_session, _mute_master, route, (aux ? Delivery::Aux : Delivery::Listen)));
|
||||||
|
|
||||||
} catch (failed_constructor& err) {
|
} catch (failed_constructor& err) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -1927,7 +1902,7 @@ Route::listen_via (boost::shared_ptr<Route> route, bool active)
|
||||||
_control_outs = listener;
|
_control_outs = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_processor (listener, (Config->get_listen_position() == AfterFaderListen ? PostFader : PreFader));
|
add_processor (listener, placement);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,8 @@
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, bool internal)
|
Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, Role r)
|
||||||
: Delivery (s, mm, string_compose (_("send %1"), (_bitslot = s.next_send_id()) + 1),
|
: Delivery (s, mm, string_compose (_("send %1"), (_bitslot = s.next_send_id()) + 1), r)
|
||||||
(internal ? Delivery::Listen : Delivery::Send))
|
|
||||||
, _metering (false)
|
, _metering (false)
|
||||||
{
|
{
|
||||||
_amp.reset (new Amp (_session, _mute_master));
|
_amp.reset (new Amp (_session, _mute_master));
|
||||||
|
|
@ -47,8 +46,8 @@ Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, bool internal)
|
||||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node, bool internal)
|
Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node, Role r)
|
||||||
: Delivery (s, mm, "send", (internal ? Delivery::Listen : Delivery::Send))
|
: Delivery (s, mm, "send", r)
|
||||||
, _metering (false)
|
, _metering (false)
|
||||||
{
|
{
|
||||||
_amp.reset (new Amp (_session, _mute_master));
|
_amp.reset (new Amp (_session, _mute_master));
|
||||||
|
|
@ -184,6 +183,7 @@ Send::make_unique (XMLNode &state, Session &session)
|
||||||
state.property("name")->set_value (name);
|
state.property("name")->set_value (name);
|
||||||
|
|
||||||
XMLNode* io = state.child ("IO");
|
XMLNode* io = state.child ("IO");
|
||||||
|
|
||||||
if (io) {
|
if (io) {
|
||||||
io->property("name")->set_value (name);
|
io->property("name")->set_value (name);
|
||||||
}
|
}
|
||||||
|
|
@ -194,7 +194,7 @@ Send::set_name (const std::string& new_name)
|
||||||
{
|
{
|
||||||
std::string unique_name;
|
std::string unique_name;
|
||||||
|
|
||||||
if (_role != Listen) {
|
if (_role == Delivery::Send) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
snprintf (buf, sizeof (buf), "%u", _bitslot);
|
snprintf (buf, sizeof (buf), "%u", _bitslot);
|
||||||
unique_name = new_name;
|
unique_name = new_name;
|
||||||
|
|
@ -205,3 +205,13 @@ Send::set_name (const std::string& new_name)
|
||||||
|
|
||||||
return Delivery::set_name (unique_name);
|
return Delivery::set_name (unique_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Send::visible () const
|
||||||
|
{
|
||||||
|
if (_role == Listen) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -820,7 +820,9 @@ Session::hookup_io ()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*x)->listen_via (_control_out, false);
|
(*x)->listen_via (_control_out,
|
||||||
|
(Config->get_listen_position() == AfterFaderListen ? PostFader : PreFader),
|
||||||
|
false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2147,8 +2149,9 @@ Session::add_routes (RouteList& new_routes, bool save)
|
||||||
if ((*x)->is_control() || (*x)->is_master()) {
|
if ((*x)->is_control() || (*x)->is_master()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cerr << "Add listen via control outs\n";
|
(*x)->listen_via (_control_out,
|
||||||
(*x)->listen_via (_control_out, false);
|
(Config->get_listen_position() == AfterFaderListen ? PostFader : PreFader),
|
||||||
|
false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
resort_routes ();
|
resort_routes ();
|
||||||
|
|
@ -2164,7 +2167,7 @@ Session::add_routes (RouteList& new_routes, bool save)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::globally_add_internal_sends (boost::shared_ptr<Route> dest)
|
Session::globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<RouteList> r = routes.reader ();
|
boost::shared_ptr<RouteList> r = routes.reader ();
|
||||||
boost::shared_ptr<RouteList> t (new RouteList);
|
boost::shared_ptr<RouteList> t (new RouteList);
|
||||||
|
|
@ -2177,11 +2180,11 @@ Session::globally_add_internal_sends (boost::shared_ptr<Route> dest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add_internal_sends (dest, t);
|
add_internal_sends (dest, p, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::add_internal_sends (boost::shared_ptr<Route> dest, boost::shared_ptr<RouteList> senders)
|
Session::add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::shared_ptr<RouteList> senders)
|
||||||
{
|
{
|
||||||
if (dest->is_control() || dest->is_master()) {
|
if (dest->is_control() || dest->is_master()) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -2197,8 +2200,7 @@ Session::add_internal_sends (boost::shared_ptr<Route> dest, boost::shared_ptr<Ro
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cerr << (*i)->name() << " listening via " << dest->name() << endl;
|
(*i)->listen_via (dest, p, true, true);
|
||||||
(*i)->listen_via (dest, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue