sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_send_and_route_panner),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_send_and_route_panner)
));
-
- add_option (_("Mixer"), new OptionEditorHeading (_("Send Controls")));
- add_option (_("Mixer"),
- new BoolOption (
- "hiding-aux-hides-connected-sends",
- _("When Aux Bus is hidden the sends in the prosessor box that feed it will be hidden"),
- sigc::mem_fun (*_rc_config, &RCConfiguration::get_hiding_aux_hides_connected_sends),
- sigc::mem_fun (*_rc_config, &RCConfiguration::set_hiding_aux_hides_connected_sends)
- ));
}
/* Signal Flow */
/* listen - internal send used only to deliver to control/monitor bus */
Listen = 0x8,
/* aux - internal send used to deliver to any bus, by user request */
- Aux = 0x10
+ Aux = 0x10,
+ /* personal - internal send used only to deliver to a personal monitor bus */
+ Personal = 0x20
};
static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert; }
void send_from_going_away ();
void send_to_going_away ();
void send_to_property_changed (const PBD::PropertyChange&);
- void send_to_pi_change (const PBD::PropertyChange&);
int connect_when_legal ();
void init_gain ();
int use_target (boost::shared_ptr<Route>);
CONFIG_VARIABLE (bool, link_send_and_route_panner, "link-send-and-route-panner", true)
CONFIG_VARIABLE (std::string, midi_audition_synth_uri, "midi-audition-synth-uri", "@default@")
-CONFIG_VARIABLE (bool, hiding_aux_hides_connected_sends, "hiding-aux-hides-connected-sends", false)
-
/* click */
CONFIG_VARIABLE (bool, clicking, "clicking", false)
PBD::Signal1<void,void*> SelectedChanged;
int add_aux_send (boost::shared_ptr<Route>, boost::shared_ptr<Processor>);
+ int add_personal_send (boost::shared_ptr<Route>);
void remove_aux_or_listen (boost::shared_ptr<Route>);
/**
uint32_t bit_slot() const { return _bitslot; }
bool display_to_user() const;
- bool is_aux () const { return _role == Aux; }
+ bool is_personal () const { return _role == Personal; }
boost::shared_ptr<Amp> amp() const { return _amp; }
boost::shared_ptr<PeakMeter> meter() const { return _meter; }
{
if (pannable) {
bool is_send = false;
- if (r & (Delivery::Send|Delivery::Aux)) is_send = true;
+ if (r & (Delivery::Send|Delivery::Aux|Delivery::Personal)) is_send = true;
_panshell = boost::shared_ptr<PannerShell>(new PannerShell (_name, _session, pannable, is_send));
}
{
if (pannable) {
bool is_send = false;
- if (r & (Delivery::Send|Delivery::Aux)) is_send = true;
+ if (r & (Delivery::Send|Delivery::Aux|Delivery::Personal)) is_send = true;
_panshell = boost::shared_ptr<PannerShell>(new PannerShell (_name, _session, pannable, is_send));
}
case Send:
case Insert:
case Aux:
+ case Personal:
if (_pre_fader) {
mp = MuteMaster::PreFader;
} else {
_send_to->DropReferences.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_going_away, this));
_send_to->PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_property_changed, this, _1));
_send_to->io_changed.connect_same_thread (target_connections, boost::bind (&InternalSend::target_io_changed, this));
- boost::shared_ptr<Stripable> st_to = boost::dynamic_pointer_cast<Stripable> (_send_to);
- st_to->presentation_info().PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_pi_change, this, _1));
- send_to_pi_change (Properties::hidden);
return 0;
}
}
}
-void
-InternalSend::send_to_pi_change (const PBD::PropertyChange& what_changed)
-{
- if (what_changed.contains (Properties::hidden)) {
- boost::shared_ptr<Stripable> st_to = boost::dynamic_pointer_cast<Stripable> (_send_to);
- if (Config->get_hiding_aux_hides_connected_sends()) {
- set_display_to_user (!st_to->is_hidden ());
- } else {
- set_display_to_user (true);
- }
- _send_from->processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
- }
-}
-
void
InternalSend::set_can_pan (bool yn)
{
return 0;
}
+int
+Route::add_personal_send (boost::shared_ptr<Route> route)
+{
+ assert (route != _session.monitor_out ());
+ boost::shared_ptr<Processor> before = before_processor_for_placement (PreFader);
+
+ {
+ Glib::Threads::RWLock::ReaderLock rm (_processor_lock);
+
+ for (ProcessorList::iterator x = _processors.begin(); x != _processors.end(); ++x) {
+
+ boost::shared_ptr<InternalSend> d = boost::dynamic_pointer_cast<InternalSend> (*x);
+
+ if (d && d->target_route() == route) {
+ /* already listening via the specified IO: do nothing */
+ return 0;
+ }
+ }
+ }
+
+ try {
+
+ boost::shared_ptr<InternalSend> listener;
+
+ {
+ Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
+ listener.reset (new InternalSend (_session, _pannable, _mute_master, boost::dynamic_pointer_cast<ARDOUR::Route>(shared_from_this()), route, Delivery::Personal));
+ }
+
+ add_processor (listener, before);
+
+ } catch (failed_constructor& err) {
+ return -1;
+ }
+
+ return 0;
+}
+
void
Route::remove_aux_or_listen (boost::shared_ptr<Route> route)
{
*/
ProcessorList new_processors;
+ ProcessorList personal_sends;
ProcessorList::iterator dr;
ProcessorList::iterator dw;
if ((*i)->display_to_user ()) {
new_processors.push_back (*i);
}
- else if (auxsnd && auxsnd->is_aux ()) {
- new_processors.push_back (*i);
+ else if (auxsnd && auxsnd->is_personal ()) {
+ personal_sends.push_back (*i);
}
}
new_processors.insert (meter_point, _meter);
}
+ /* Personal Sends */
+
+ for (ProcessorList::iterator i = personal_sends.begin(); i != personal_sends.end(); ++i) {
+ new_processors.insert (amp, (*i));
+ }
+
/* MONITOR SEND */
if (_monitor_send && !is_monitor ()) {
return _("listen"); // no ports, no need for numbering
case Delivery::Send:
return string_compose (_("send %1"), (bitslot = s.next_send_id ()) + 1);
+ case Delivery::Personal:
+ return string_compose (_("personal %1"), (bitslot = s.next_aux_send_id ()) + 1);
default:
fatal << string_compose (_("programming error: send created using role %1"), enum_2_string (r)) << endmsg;
abort(); /*NOTREACHED*/
_send_delay.reset (new DelayLine (_session, "Send-" + name()));
_thru_delay.reset (new DelayLine (_session, "Thru-" + name()));
- _display_to_user = true;
-
if (panner_shell()) {
panner_shell()->Changed.connect_same_thread (*this, boost::bind (&Send::panshell_changed, this));
}
*/
if ((prop = node.property ("bitslot")) == 0) {
- if (_role == Delivery::Aux) {
+ if (_role == Delivery::Aux || _role == Delivery::Personal) {
_bitslot = _session.next_aux_send_id ();
} else if (_role == Delivery::Send) {
_bitslot = _session.next_send_id ();
_bitslot = 0;
}
} else {
- if (_role == Delivery::Aux) {
+ if (_role == Delivery::Aux || _role == Delivery::Personal) {
_session.unmark_aux_send_id (_bitslot);
_bitslot = string_to<uint32_t>(prop->value());
_session.mark_aux_send_id (_bitslot);
{
/* we ignore Deliver::_display_to_user */
- if (_role == Listen) {
+ if (_role == Listen || _role == Personal) {
/* don't make the monitor/control/listen send visible */
return false;
- } else if (_role == Aux) {
- return _display_to_user;
}
return true;
bool s_only = true;
if (!rt_send->feeds (aux, &s_only)) {
// create send
- boost::shared_ptr<Processor> loc = rt_send->before_processor_for_placement (PreFader);
- rt_send->add_aux_send (aux, loc);
+ rt_send->add_personal_send (aux);
boost::shared_ptr<Send> snd = rt_send->internal_send_for (aux);
session->dirty ();
return 0;