mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 13:16:27 +01:00
lots of odds and ends to do with solo isolate and its GUI
git-svn-id: svn://localhost/ardour2/branches/3.0@7072 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e1ed9467dc
commit
f2ceb5c340
12 changed files with 186 additions and 44 deletions
|
|
@ -332,14 +332,14 @@ style "solo_button" = "small_button"
|
||||||
|
|
||||||
style "solo_isolate_led"
|
style "solo_isolate_led"
|
||||||
{
|
{
|
||||||
|
fg[NORMAL] = { 0.725, 0.925, 0.949 }
|
||||||
fg[ACTIVE] = { 1.0, 0, 0 }
|
fg[ACTIVE] = { 1.0, 0, 0 }
|
||||||
fg[NORMAL] = { 0, 1.0, 0 }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
style "solo_safe_led"
|
style "solo_safe_led"
|
||||||
{
|
{
|
||||||
fg[ACTIVE] = { 0.26, 0.47, 0.69 }
|
fg[NORMAL] = { 0.725, 0.925, 0.949 }
|
||||||
fg[NORMAL] = { 0, 1.0, 0 }
|
fg[ACTIVE] = { 1.0, 0, 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
style "solo_button_alternate" = "small_button"
|
style "solo_button_alternate" = "small_button"
|
||||||
|
|
@ -456,6 +456,13 @@ style "monitor_dim_button" = "small_button"
|
||||||
fg[ACTIVE] = { 0, 0, 0 }
|
fg[ACTIVE] = { 0, 0, 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
style "monitor_iso_button" = "small_button"
|
||||||
|
{
|
||||||
|
font_name = "@FONT_SMALLER@"
|
||||||
|
bg[ACTIVE] = { 0.725, 0.925, 0.949 }
|
||||||
|
fg[ACTIVE] = { 0, 0, 0 }
|
||||||
|
}
|
||||||
|
|
||||||
style "mute_button" = "small_button"
|
style "mute_button" = "small_button"
|
||||||
{
|
{
|
||||||
bg[ACTIVE] = { 0.90, 0.89, 0.73 }
|
bg[ACTIVE] = { 0.90, 0.89, 0.73 }
|
||||||
|
|
@ -1689,6 +1696,8 @@ widget "*MonitorInvertButton" style:highest "monitor_invert_button"
|
||||||
widget "*MonitorInvertButton*" style:highest "monitor_invert_button"
|
widget "*MonitorInvertButton*" style:highest "monitor_invert_button"
|
||||||
widget "*MonitorOptButton" style:highest "monitor_opt_button"
|
widget "*MonitorOptButton" style:highest "monitor_opt_button"
|
||||||
widget "*MonitorOptButton*" style:highest "monitor_opt_button"
|
widget "*MonitorOptButton*" style:highest "monitor_opt_button"
|
||||||
|
widget "*MonitorIsoAlert" style:highest "monitor_iso_button"
|
||||||
|
widget "*MonitorIsoAlert*" style:highest "monitor_iso_button"
|
||||||
widget "*BypassButton" style:highest "red_when_active"
|
widget "*BypassButton" style:highest "red_when_active"
|
||||||
widget "*BypassButton*" style:highest "red_when_active"
|
widget "*BypassButton*" style:highest "red_when_active"
|
||||||
widget "*TransportSoloAlert" style:highest "flashing_alert"
|
widget "*TransportSoloAlert" style:highest "flashing_alert"
|
||||||
|
|
@ -1806,4 +1815,4 @@ widget "*PortMatrixLabel*" style:highest "small_text"
|
||||||
widget "*MidiTracerTextView" style:highest "midi_tracer_textview"
|
widget "*MidiTracerTextView" style:highest "midi_tracer_textview"
|
||||||
widget "*SoloIsolatedLED" style:highest "solo_isolate_led"
|
widget "*SoloIsolatedLED" style:highest "solo_isolate_led"
|
||||||
widget "*SoloSafeLED" style:highest "solo_safe_led"
|
widget "*SoloSafeLED" style:highest "solo_safe_led"
|
||||||
widget "*SoloLEDLabel" style:highest "smallest_text"
|
widget "*SoloLEDLabel" style:highest "very_small_text"
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,43 @@ LED::set_visual_state (int32_t s)
|
||||||
if (s != _visual_state) {
|
if (s != _visual_state) {
|
||||||
|
|
||||||
_visual_state = s;
|
_visual_state = s;
|
||||||
|
set_colors_from_style ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LED::set_diameter (float d)
|
||||||
|
{
|
||||||
|
_diameter = (d*2) + 5.0;
|
||||||
|
|
||||||
|
if (_diameter != 0.0) {
|
||||||
|
_fixed_diameter = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_dirty ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LED::on_realize ()
|
||||||
|
{
|
||||||
|
set_colors_from_style ();
|
||||||
|
CairoWidget::on_realize ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LED::on_size_request (Gtk::Requisition* req)
|
||||||
|
{
|
||||||
|
if (_fixed_diameter) {
|
||||||
|
req->width = _diameter;
|
||||||
|
req->height = _diameter;
|
||||||
|
} else {
|
||||||
|
CairoWidget::on_size_request (req);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LED::set_colors_from_style ()
|
||||||
|
{
|
||||||
RefPtr<Style> style = get_style();
|
RefPtr<Style> style = get_style();
|
||||||
Color c;
|
Color c;
|
||||||
|
|
||||||
|
|
@ -141,27 +177,3 @@ LED::set_visual_state (int32_t s)
|
||||||
|
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LED::set_diameter (float d)
|
|
||||||
{
|
|
||||||
_diameter = (d*2) + 5.0;
|
|
||||||
|
|
||||||
if (_diameter != 0.0) {
|
|
||||||
_fixed_diameter = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
set_dirty ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LED::on_size_request (Gtk::Requisition* req)
|
|
||||||
{
|
|
||||||
if (_fixed_diameter) {
|
|
||||||
req->width = _diameter;
|
|
||||||
req->height = _diameter;
|
|
||||||
} else {
|
|
||||||
CairoWidget::on_size_request (req);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ class LED : public CairoWidget
|
||||||
protected:
|
protected:
|
||||||
void render (cairo_t *);
|
void render (cairo_t *);
|
||||||
void on_size_request (Gtk::Requisition* req);
|
void on_size_request (Gtk::Requisition* req);
|
||||||
|
void on_realize ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t _visual_state;
|
int32_t _visual_state;
|
||||||
|
|
@ -46,6 +47,8 @@ class LED : public CairoWidget
|
||||||
float _red;
|
float _red;
|
||||||
float _green;
|
float _green;
|
||||||
float _blue;
|
float _blue;
|
||||||
|
|
||||||
|
void set_colors_from_style ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk2_ardour_led_h__ */
|
#endif /* __gtk2_ardour_led_h__ */
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ MixerStrip::init ()
|
||||||
|
|
||||||
solo_isolated_led = manage (new LED);
|
solo_isolated_led = manage (new LED);
|
||||||
solo_isolated_led->show ();
|
solo_isolated_led->show ();
|
||||||
solo_isolated_led->set_diameter (5);
|
solo_isolated_led->set_diameter (6);
|
||||||
solo_isolated_led->set_no_show_all (true);
|
solo_isolated_led->set_no_show_all (true);
|
||||||
solo_isolated_led->set_name (X_("SoloIsolatedLED"));
|
solo_isolated_led->set_name (X_("SoloIsolatedLED"));
|
||||||
solo_isolated_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
solo_isolated_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||||
|
|
@ -197,7 +197,7 @@ MixerStrip::init ()
|
||||||
|
|
||||||
solo_safe_led = manage (new LED);
|
solo_safe_led = manage (new LED);
|
||||||
solo_safe_led->show ();
|
solo_safe_led->show ();
|
||||||
solo_safe_led->set_diameter (5);
|
solo_safe_led->set_diameter (6);
|
||||||
solo_safe_led->set_no_show_all (true);
|
solo_safe_led->set_no_show_all (true);
|
||||||
solo_safe_led->set_name (X_("SoloSafeLED"));
|
solo_safe_led->set_name (X_("SoloSafeLED"));
|
||||||
solo_safe_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
solo_safe_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||||
|
|
@ -215,10 +215,10 @@ MixerStrip::init ()
|
||||||
|
|
||||||
solo_led_table.set_spacings (0);
|
solo_led_table.set_spacings (0);
|
||||||
solo_led_table.set_border_width (1);
|
solo_led_table.set_border_width (1);
|
||||||
solo_led_table.attach (*solo_isolated_led, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
|
solo_led_table.attach (*iso_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
|
||||||
solo_led_table.attach (*iso_label, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
|
solo_led_table.attach (*solo_isolated_led, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
|
||||||
solo_led_table.attach (*solo_safe_led, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
|
solo_led_table.attach (*safe_label, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
|
||||||
solo_led_table.attach (*safe_label, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
|
solo_led_table.attach (*solo_safe_led, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
|
||||||
|
|
||||||
solo_led_table.show ();
|
solo_led_table.show ();
|
||||||
solo_led_box.pack_end (solo_led_table, false, false);
|
solo_led_box.pack_end (solo_led_table, false, false);
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ MonitorSection::MonitorSection (Session* s)
|
||||||
, dim_all_button (_("dim"))
|
, dim_all_button (_("dim"))
|
||||||
, mono_button (_("mono"))
|
, mono_button (_("mono"))
|
||||||
, rude_solo_button (_("soloing"))
|
, rude_solo_button (_("soloing"))
|
||||||
|
, rude_iso_button (_("isolated"))
|
||||||
, rude_audition_button (_("auditioning"))
|
, rude_audition_button (_("auditioning"))
|
||||||
, exclusive_solo_button (_("Exclusive"))
|
, exclusive_solo_button (_("Exclusive"))
|
||||||
, solo_mute_override_button (_("Solo/Mute"))
|
, solo_mute_override_button (_("Solo/Mute"))
|
||||||
|
|
@ -92,6 +93,9 @@ MonitorSection::MonitorSection (Session* s)
|
||||||
rude_solo_button.set_name ("TransportSoloAlert");
|
rude_solo_button.set_name ("TransportSoloAlert");
|
||||||
rude_solo_button.show ();
|
rude_solo_button.show ();
|
||||||
|
|
||||||
|
rude_iso_button.set_name ("MonitorIsoAlert");
|
||||||
|
rude_iso_button.show ();
|
||||||
|
|
||||||
rude_audition_button.set_name ("TransportAuditioningAlert");
|
rude_audition_button.set_name ("TransportAuditioningAlert");
|
||||||
rude_audition_button.show ();
|
rude_audition_button.show ();
|
||||||
|
|
||||||
|
|
@ -100,6 +104,9 @@ MonitorSection::MonitorSection (Session* s)
|
||||||
rude_solo_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_solo), false);
|
rude_solo_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_solo), false);
|
||||||
UI::instance()->set_tip (rude_solo_button, _("When active, something is soloed.\nClick to de-solo everything"));
|
UI::instance()->set_tip (rude_solo_button, _("When active, something is soloed.\nClick to de-solo everything"));
|
||||||
|
|
||||||
|
rude_iso_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_isolate), false);
|
||||||
|
UI::instance()->set_tip (rude_iso_button, _("When active, something is solo-isolated.\nClick to de-isolate everything"));
|
||||||
|
|
||||||
rude_audition_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_audition), false);
|
rude_audition_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_audition), false);
|
||||||
UI::instance()->set_tip (rude_audition_button, _("When active, auditioning is active.\nClick to stop the audition"));
|
UI::instance()->set_tip (rude_audition_button, _("When active, auditioning is active.\nClick to stop the audition"));
|
||||||
|
|
||||||
|
|
@ -182,7 +189,12 @@ MonitorSection::MonitorSection (Session* s)
|
||||||
solo_opt_box->show ();
|
solo_opt_box->show ();
|
||||||
|
|
||||||
upper_packer.set_spacing (12);
|
upper_packer.set_spacing (12);
|
||||||
upper_packer.pack_start (rude_solo_button, false, false);
|
|
||||||
|
Gtk::HBox* rude_box = manage (new HBox);
|
||||||
|
rude_box->pack_start (rude_solo_button, true, true);
|
||||||
|
rude_box->pack_start (rude_iso_button, true, true);
|
||||||
|
|
||||||
|
upper_packer.pack_start (*rude_box, false, false);
|
||||||
upper_packer.pack_start (rude_audition_button, false, false);
|
upper_packer.pack_start (rude_audition_button, false, false);
|
||||||
upper_packer.pack_start (solo_model_box, false, false);
|
upper_packer.pack_start (solo_model_box, false, false);
|
||||||
upper_packer.pack_start (*solo_opt_box, false, false);
|
upper_packer.pack_start (*solo_opt_box, false, false);
|
||||||
|
|
@ -306,12 +318,13 @@ MonitorSection::set_session (Session* s)
|
||||||
_route.reset ();
|
_route.reset ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* no session */
|
/* no session */
|
||||||
_monitor.reset ();
|
_monitor.reset ();
|
||||||
_route.reset ();
|
_route.reset ();
|
||||||
control_connections.drop_connections ();
|
control_connections.drop_connections ();
|
||||||
|
rude_iso_button.set_active (false);
|
||||||
|
rude_solo_button.set_active (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* both might be null */
|
/* both might be null */
|
||||||
|
|
@ -920,9 +933,15 @@ MonitorSection::solo_blink (bool onoff)
|
||||||
} else {
|
} else {
|
||||||
rude_solo_button.set_state (STATE_NORMAL);
|
rude_solo_button.set_state (STATE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_session->soloing()) {
|
||||||
|
rude_iso_button.set_active (_session->solo_isolated());
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// rude_solo_button.set_active (false);
|
// rude_solo_button.set_active (false);
|
||||||
rude_solo_button.set_state (STATE_NORMAL);
|
rude_solo_button.set_state (STATE_NORMAL);
|
||||||
|
rude_iso_button.set_active (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -940,6 +959,17 @@ MonitorSection::cancel_solo (GdkEventButton* ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
MonitorSection::cancel_isolate (GdkEventButton* ev)
|
||||||
|
{
|
||||||
|
if (_session) {
|
||||||
|
boost::shared_ptr<RouteList> rl (_session->get_routes ());
|
||||||
|
_session->set_solo_isolated (rl, false, Session::rt_cleanup, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MonitorSection::cancel_audition (GdkEventButton* ev)
|
MonitorSection::cancel_audition (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ class MonitorSection : public RouteUI
|
||||||
BindableToggleButton dim_all_button;
|
BindableToggleButton dim_all_button;
|
||||||
BindableToggleButton mono_button;
|
BindableToggleButton mono_button;
|
||||||
BindableToggleButton rude_solo_button;
|
BindableToggleButton rude_solo_button;
|
||||||
|
BindableToggleButton rude_iso_button;
|
||||||
BindableToggleButton rude_audition_button;
|
BindableToggleButton rude_audition_button;
|
||||||
BindableToggleButton exclusive_solo_button;
|
BindableToggleButton exclusive_solo_button;
|
||||||
BindableToggleButton solo_mute_override_button;
|
BindableToggleButton solo_mute_override_button;
|
||||||
|
|
@ -123,10 +124,12 @@ class MonitorSection : public RouteUI
|
||||||
void solo_blink (bool);
|
void solo_blink (bool);
|
||||||
void audition_blink (bool);
|
void audition_blink (bool);
|
||||||
bool cancel_solo (GdkEventButton*);
|
bool cancel_solo (GdkEventButton*);
|
||||||
|
bool cancel_isolate (GdkEventButton*);
|
||||||
bool cancel_audition (GdkEventButton*);
|
bool cancel_audition (GdkEventButton*);
|
||||||
void solo_cut_changed ();
|
void solo_cut_changed ();
|
||||||
void update_solo_model ();
|
void update_solo_model ();
|
||||||
void parameter_changed (std::string);
|
void parameter_changed (std::string);
|
||||||
|
void isolated_changed ();
|
||||||
|
|
||||||
PBD::ScopedConnection config_connection;
|
PBD::ScopedConnection config_connection;
|
||||||
PBD::ScopedConnectionList control_connections;
|
PBD::ScopedConnectionList control_connections;
|
||||||
|
|
|
||||||
|
|
@ -1072,13 +1072,33 @@ RouteUI::muting_change ()
|
||||||
bool
|
bool
|
||||||
RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
|
if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool view = (solo_isolated_led->visual_state() != 0);
|
bool view = (solo_isolated_led->visual_state() != 0);
|
||||||
bool model = _route->solo_isolated();
|
bool model = _route->solo_isolated();
|
||||||
|
|
||||||
/* called BEFORE the view has changed */
|
/* called BEFORE the view has changed */
|
||||||
|
|
||||||
|
if (ev->button == 1) {
|
||||||
|
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||||
|
|
||||||
|
if (model) {
|
||||||
|
/* disable isolate for all routes */
|
||||||
|
_session->set_solo_isolated (_session->get_routes(), false, Session::rt_cleanup, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
if (model == view) {
|
if (model == view) {
|
||||||
_route->set_solo_isolated (!view, this);
|
|
||||||
|
/* flip just this route */
|
||||||
|
|
||||||
|
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||||
|
rl->push_back (_route);
|
||||||
|
_session->set_solo_isolated (rl, !view, Session::rt_cleanup, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -583,6 +583,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
|
|
||||||
bool soloing() const { return _non_soloed_outs_muted; }
|
bool soloing() const { return _non_soloed_outs_muted; }
|
||||||
bool listening() const { return _listen_cnt > 0; }
|
bool listening() const { return _listen_cnt > 0; }
|
||||||
|
bool solo_isolated() const { return _solo_isolated_cnt > 0; }
|
||||||
|
|
||||||
static const SessionEvent::RTeventCallback rt_cleanup;
|
static const SessionEvent::RTeventCallback rt_cleanup;
|
||||||
|
|
||||||
|
|
@ -591,10 +592,11 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
void set_mute (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
void set_mute (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
||||||
void set_listen (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
void set_listen (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
||||||
void set_record_enable (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
void set_record_enable (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
||||||
|
void set_solo_isolated (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false);
|
||||||
|
|
||||||
PBD::Signal1<void,bool> SoloActive;
|
PBD::Signal1<void,bool> SoloActive;
|
||||||
PBD::Signal0<void> SoloChanged;
|
PBD::Signal0<void> SoloChanged;
|
||||||
|
PBD::Signal0<void> IsolatedChanged;
|
||||||
|
|
||||||
/* control/master out */
|
/* control/master out */
|
||||||
|
|
||||||
|
|
@ -861,6 +863,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
float _meter_falloff;
|
float _meter_falloff;
|
||||||
bool _non_soloed_outs_muted;
|
bool _non_soloed_outs_muted;
|
||||||
uint32_t _listen_cnt;
|
uint32_t _listen_cnt;
|
||||||
|
uint32_t _solo_isolated_cnt;
|
||||||
bool _writable;
|
bool _writable;
|
||||||
bool _was_seamless;
|
bool _was_seamless;
|
||||||
|
|
||||||
|
|
@ -1220,6 +1223,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
void route_listen_changed (void *src, boost::weak_ptr<Route>);
|
void route_listen_changed (void *src, boost::weak_ptr<Route>);
|
||||||
void route_mute_changed (void *src);
|
void route_mute_changed (void *src);
|
||||||
void route_solo_changed (bool self_solo_change, void *src, boost::weak_ptr<Route>);
|
void route_solo_changed (bool self_solo_change, void *src, boost::weak_ptr<Route>);
|
||||||
|
void route_solo_isolated_changed (void *src, boost::weak_ptr<Route>);
|
||||||
void update_route_solo_state (boost::shared_ptr<RouteList> r = boost::shared_ptr<RouteList>());
|
void update_route_solo_state (boost::shared_ptr<RouteList> r = boost::shared_ptr<RouteList>());
|
||||||
|
|
||||||
void listen_position_changed ();
|
void listen_position_changed ();
|
||||||
|
|
@ -1437,6 +1441,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
void rt_set_just_one_solo (boost::shared_ptr<RouteList>, bool yn, bool /* ignored*/ );
|
void rt_set_just_one_solo (boost::shared_ptr<RouteList>, bool yn, bool /* ignored*/ );
|
||||||
void rt_set_mute (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
void rt_set_mute (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
||||||
void rt_set_listen (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
void rt_set_listen (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
||||||
|
void rt_set_solo_isolated (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
||||||
void rt_set_record_enable (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
void rt_set_record_enable (boost::shared_ptr<RouteList>, bool yn, bool group_override);
|
||||||
|
|
||||||
/** temporary list of Diskstreams used only during load of 2.X sessions */
|
/** temporary list of Diskstreams used only during load of 2.X sessions */
|
||||||
|
|
|
||||||
|
|
@ -716,22 +716,27 @@ Route::set_solo_isolated (bool yn, void *src)
|
||||||
|
|
||||||
/* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
|
/* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
if (yn) {
|
if (yn) {
|
||||||
if (_solo_isolated == 0) {
|
if (_solo_isolated == 0) {
|
||||||
_mute_master->set_solo_ignore (true);
|
_mute_master->set_solo_ignore (true);
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
_solo_isolated++;
|
_solo_isolated++;
|
||||||
solo_isolated_changed (src);
|
|
||||||
} else {
|
} else {
|
||||||
if (_solo_isolated > 0) {
|
if (_solo_isolated > 0) {
|
||||||
_solo_isolated--;
|
_solo_isolated--;
|
||||||
if (_solo_isolated == 0) {
|
if (_solo_isolated == 0) {
|
||||||
_mute_master->set_solo_ignore (false);
|
_mute_master->set_solo_ignore (false);
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
solo_isolated_changed (src);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
|
solo_isolated_changed (src);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -1993,6 +1993,7 @@ Session::add_routes (RouteList& new_routes, bool save)
|
||||||
|
|
||||||
r->listen_changed.connect_same_thread (*this, boost::bind (&Session::route_listen_changed, this, _1, wpr));
|
r->listen_changed.connect_same_thread (*this, boost::bind (&Session::route_listen_changed, this, _1, wpr));
|
||||||
r->solo_changed.connect_same_thread (*this, boost::bind (&Session::route_solo_changed, this, _1, _2, wpr));
|
r->solo_changed.connect_same_thread (*this, boost::bind (&Session::route_solo_changed, this, _1, _2, wpr));
|
||||||
|
r->solo_isolated_changed.connect_same_thread (*this, boost::bind (&Session::route_solo_isolated_changed, this, _1, wpr));
|
||||||
r->mute_changed.connect_same_thread (*this, boost::bind (&Session::route_mute_changed, this, _1));
|
r->mute_changed.connect_same_thread (*this, boost::bind (&Session::route_mute_changed, this, _1));
|
||||||
r->output()->changed.connect_same_thread (*this, boost::bind (&Session::set_worst_io_latencies_x, this, _1, _2));
|
r->output()->changed.connect_same_thread (*this, boost::bind (&Session::set_worst_io_latencies_x, this, _1, _2));
|
||||||
r->processors_changed.connect_same_thread (*this, boost::bind (&Session::route_processors_changed, this, _1));
|
r->processors_changed.connect_same_thread (*this, boost::bind (&Session::route_processors_changed, this, _1));
|
||||||
|
|
@ -2161,14 +2162,13 @@ Session::remove_route (shared_ptr<Route> route)
|
||||||
_monitor_out.reset ();
|
_monitor_out.reset ();
|
||||||
}
|
}
|
||||||
|
|
||||||
update_route_solo_state ();
|
|
||||||
|
|
||||||
/* writer goes out of scope, forces route list update */
|
/* writer goes out of scope, forces route list update */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_route_solo_state ();
|
||||||
find_current_end ();
|
find_current_end ();
|
||||||
|
|
||||||
// We need to disconnect the routes inputs and outputs
|
// We need to disconnect the route's inputs and outputs
|
||||||
|
|
||||||
route->input()->disconnect (0);
|
route->input()->disconnect (0);
|
||||||
route->output()->disconnect (0);
|
route->output()->disconnect (0);
|
||||||
|
|
@ -2244,6 +2244,35 @@ Session::route_listen_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
|
||||||
_listen_cnt--;
|
_listen_cnt--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void
|
||||||
|
Session::route_solo_isolated_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
|
||||||
|
{
|
||||||
|
boost::shared_ptr<Route> route = wpr.lock ();
|
||||||
|
|
||||||
|
if (!route) {
|
||||||
|
/* should not happen */
|
||||||
|
error << string_compose (_("programming error: %1"), X_("invalid route weak ptr passed to route_solo_changed")) << endmsg;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool send_changed = false;
|
||||||
|
|
||||||
|
if (route->solo_isolated()) {
|
||||||
|
if (_solo_isolated_cnt == 0) {
|
||||||
|
send_changed = true;
|
||||||
|
}
|
||||||
|
_solo_isolated_cnt++;
|
||||||
|
} else if (_solo_isolated_cnt > 0) {
|
||||||
|
_solo_isolated_cnt--;
|
||||||
|
if (_solo_isolated_cnt == 0) {
|
||||||
|
send_changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (send_changed) {
|
||||||
|
IsolatedChanged (); /* EMIT SIGNAL */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_ptr<Route> wpr)
|
Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_ptr<Route> wpr)
|
||||||
|
|
@ -2340,6 +2369,7 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
|
||||||
|
|
||||||
bool something_soloed = false;
|
bool something_soloed = false;
|
||||||
uint32_t listeners = 0;
|
uint32_t listeners = 0;
|
||||||
|
uint32_t isolated = 0;
|
||||||
|
|
||||||
if (!r) {
|
if (!r) {
|
||||||
r = routes.reader();
|
r = routes.reader();
|
||||||
|
|
@ -2348,7 +2378,6 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
|
||||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||||
if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_hidden() && (*i)->self_soloed()) {
|
if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_hidden() && (*i)->self_soloed()) {
|
||||||
something_soloed = true;
|
something_soloed = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*i)->is_hidden() && (*i)->listening()) {
|
if (!(*i)->is_hidden() && (*i)->listening()) {
|
||||||
|
|
@ -2358,6 +2387,10 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
|
||||||
(*i)->set_listen (false, this);
|
(*i)->set_listen (false, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((*i)->solo_isolated()) {
|
||||||
|
isolated++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (something_soloed != _non_soloed_outs_muted) {
|
if (something_soloed != _non_soloed_outs_muted) {
|
||||||
|
|
@ -2365,8 +2398,11 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
|
||||||
SoloActive (_non_soloed_outs_muted); /* EMIT SIGNAL */
|
SoloActive (_non_soloed_outs_muted); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listeners) {
|
|
||||||
_listen_cnt = listeners;
|
_listen_cnt = listeners;
|
||||||
|
|
||||||
|
if (isolated != _solo_isolated_cnt) {
|
||||||
|
_solo_isolated_cnt = isolated;
|
||||||
|
IsolatedChanged (); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,24 @@ Session::rt_set_mute (boost::shared_ptr<RouteList> rl, bool yn, bool /*group_ove
|
||||||
set_dirty();
|
set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Session::set_solo_isolated (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
|
||||||
|
{
|
||||||
|
queue_event (get_rt_event (rl, yn, after, group_override, &Session::rt_set_solo_isolated));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Session::rt_set_solo_isolated (boost::shared_ptr<RouteList> rl, bool yn, bool /*group_override*/)
|
||||||
|
{
|
||||||
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
|
if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_hidden()) {
|
||||||
|
(*i)->set_solo_isolated (yn, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set_dirty();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::set_record_enable (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
|
Session::set_record_enable (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
|
||||||
|
|
||||||
_non_soloed_outs_muted = false;
|
_non_soloed_outs_muted = false;
|
||||||
_listen_cnt = 0;
|
_listen_cnt = 0;
|
||||||
|
_solo_isolated_cnt = 0;
|
||||||
g_atomic_int_set (&processing_prohibited, 0);
|
g_atomic_int_set (&processing_prohibited, 0);
|
||||||
_transport_speed = 0;
|
_transport_speed = 0;
|
||||||
_last_transport_speed = 0;
|
_last_transport_speed = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue