From 3fa522e5df8401e8351c9a87f2f761f87a87a31a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 5 May 2010 15:47:51 +0000 Subject: [PATCH] make "exclusive solo" apply to listen as well as SiP git-svn-id: svn://localhost/ardour2/branches/3.0@7064 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/rc_option_editor.cc | 19 ++++++++++++++----- libs/ardour/route.cc | 5 ++++- libs/ardour/session.cc | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 1bc4f0a252..a53e988712 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3,9 +3,13 @@ #include #include #include + #include "pbd/fpu.h" + #include "midi++/manager.h" #include "midi++/factory.h" + +#include "ardour/audioengine.h" #include "ardour/dB.h" #include "ardour/rc_configuration.h" #include "ardour/control_protocol_manager.h" @@ -443,10 +447,10 @@ static const struct { { "Command", GDK_META_MASK }, { "Control", GDK_CONTROL_MASK }, { "Option", GDK_MOD1_MASK }, - { "Command-Shift", GDK_MOD1_MASK|GDK_SHIFT_MASK }, - { "Command-Option", GDK_MOD1_MASK|GDK_MOD5_MASK }, - { "Shift-Option", GDK_SHIFT_MASK|GDK_MOD5_MASK }, - { "Shift-Command-Option", GDK_MOD5_MASK|GDK_SHIFT_MASK|GDK_MOD1_MASK }, + { "Command-Shift", GDK_META_MASK|GDK_SHIFT_MASK }, + { "Command-Option", GDK_MOD1_MASK|GDK_META_MASK }, + { "Shift-Option", GDK_SHIFT_MASK|GDK_MOD1_MASK }, + { "Shift-Command-Option", GDK_MOD5_MASK|GDK_SHIFT_MASK|GDK_META_MASK }, #else { "Shift", GDK_SHIFT_MASK }, @@ -1234,7 +1238,12 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_monitoring_model) ); - mm->add (HardwareMonitoring, _("JACK")); +#ifndef __APPLE__ + /* no JACK monitoring on CoreAudio */ + if (AudioEngine::instance()->can_request_hardware_monitoring()) { + mm->add (HardwareMonitoring, _("JACK")); + } +#endif mm->add (SoftwareMonitoring, _("ardour")); mm->add (ExternalMonitoring, _("audio hardware")); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 7bd9157514..7eeae417d9 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -536,11 +536,14 @@ Route::set_listen (bool yn, void* src) } if (_monitor_send) { + cerr << name() << " set listen = " << yn << " current = " << _monitor_send->active() << endl; if (yn != _monitor_send->active()) { if (yn) { _monitor_send->activate (); - } else { + _mute_master->set_soloed (true); + } else { _monitor_send->deactivate (); + _mute_master->set_soloed (false); } listen_changed (src); /* EMIT SIGNAL */ diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 3fc0603a5b..0b796a32bf 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2225,8 +2225,22 @@ Session::route_listen_changed (void* /*src*/, boost::weak_ptr wpr) } if (route->listening()) { + + if (Config->get_exclusive_solo()) { + /* new listen: disable all other listen */ + shared_ptr r = routes.reader (); + for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { + if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) { + continue; + } + (*i)->set_listen (false, this); + } + } + _listen_cnt++; + } else if (_listen_cnt > 0) { + _listen_cnt--; } } -- 2.30.2