summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/route.h6
-rw-r--r--libs/ardour/ardour/session.h15
-rw-r--r--libs/ardour/ardour/session_solo_notifications.h53
3 files changed, 62 insertions, 12 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 8902665170..b976e63c69 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -350,14 +350,8 @@ public:
framecnt_t signal_latency() const { return _signal_latency; }
PBD::Signal0<void> active_changed;
- PBD::Signal0<void> phase_invert_changed;
PBD::Signal0<void> denormal_protection_changed;
- PBD::Signal1<void,PBD::Controllable::GroupControlDisposition> listen_changed;
- PBD::Signal2<void,bool,PBD::Controllable::GroupControlDisposition> solo_changed;
- PBD::Signal0<void> solo_safe_changed;
- PBD::Signal0<void> solo_isolated_changed;
PBD::Signal0<void> comment_changed;
- PBD::Signal0<void> mute_changed;
PBD::Signal0<void> mute_points_changed;
/** track numbers - assigned by session
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 2976fec8f3..b3852b631d 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -67,6 +67,7 @@
#include "ardour/rc_configuration.h"
#include "ardour/session_configuration.h"
#include "ardour/session_event.h"
+#include "ardour/session_solo_notifications.h"
#include "ardour/interpolation.h"
#include "ardour/plugin.h"
#include "ardour/route.h"
@@ -165,7 +166,7 @@ private:
};
/** Ardour Session */
-class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
+class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager, public SessionSoloNotifications<Session>
{
public:
enum RecordState {
@@ -1683,12 +1684,14 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void reassign_track_numbers ();
uint32_t _track_number_decimals;
- /* mixer stuff */
+ /* solo/mute/notifications (see SessionSoloNotifications object) */
+
+ friend class SessionSoloNotifications;
+ void _route_listen_changed (PBD::Controllable::GroupControlDisposition, boost::shared_ptr<Route>);
+ void _route_mute_changed ();
+ void _route_solo_changed (bool self_solo_change, PBD::Controllable::GroupControlDisposition group_override, boost::shared_ptr<Route>);
+ void _route_solo_isolated_changed (boost::shared_ptr<Route>);
- void route_listen_changed (PBD::Controllable::GroupControlDisposition, boost::weak_ptr<Route>);
- void route_mute_changed ();
- void route_solo_changed (bool self_solo_change, PBD::Controllable::GroupControlDisposition group_override, boost::weak_ptr<Route>);
- void route_solo_isolated_changed (boost::weak_ptr<Route>);
void update_route_solo_state (boost::shared_ptr<RouteList> r = boost::shared_ptr<RouteList>());
void listen_position_changed ();
diff --git a/libs/ardour/ardour/session_solo_notifications.h b/libs/ardour/ardour/session_solo_notifications.h
new file mode 100644
index 0000000000..bfb2e7d333
--- /dev/null
+++ b/libs/ardour/ardour/session_solo_notifications.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2016 Paul Davis
+
+ 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 __libardour_session_solo_notifications_h__
+#define __libardour_session_solo_notifications_h__
+
+#include <boost/shared_ptr.hpp>
+#include "pbd/controllable.h"
+
+namespace ARDOUR {
+
+class Route;
+
+template<typename T>
+class SessionSoloNotifications
+{
+ public:
+ void solo_changed (bool self_solo_change, PBD::Controllable::GroupControlDisposition gcd, boost::shared_ptr<Route> route) {
+ static_cast<T*>(this)->_route_solo_changed (self_solo_change, gcd, route);
+ }
+
+ void listen_changed (PBD::Controllable::GroupControlDisposition gcd, boost::shared_ptr<Route> route) {
+ static_cast<T*>(this)->_route_listen_changed (gcd, route);
+ }
+
+ void mute_changed () {
+ static_cast<T*>(this)->_route_mute_changed ();
+ }
+
+ void solo_isolated_changed (boost::shared_ptr<Route> route) {
+ static_cast<T*>(this)->_route_solo_isolated_changed (route);
+ }
+};
+
+} /* namespace */
+
+#endif /* __libardour_session_solo_notifications_h__ */