summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-05-01 15:09:19 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-05-01 15:09:19 +0000
commit576cdb08b5eab456eea91263fac1709dd7931a9d (patch)
tree393d7d17bfb283f37a5158d9c1db35af5944874d /libs/ardour/ardour
parente99cf351f58d4c1d848f8138e5dd295b34ffcf0e (diff)
perhaps, just possibly, a working solo model. needs to be fixed so that connections to other JACK clients count as "physical" connections, so don't use this with ardour connected to other JACK apps just yet. Oh, this also invalidates existing a3 sessions again
git-svn-id: svn://localhost/ardour2/branches/3.0@7033 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/io.h3
-rw-r--r--libs/ardour/ardour/mute_master.h8
-rw-r--r--libs/ardour/ardour/port.h4
-rw-r--r--libs/ardour/ardour/route.h24
-rw-r--r--libs/ardour/ardour/session.h1
-rw-r--r--libs/ardour/ardour/types.h7
6 files changed, 38 insertions, 9 deletions
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index a7ba3a23a9..72815c17cc 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -108,7 +108,8 @@ class IO : public SessionObject, public Latent
int disconnect (void *src);
bool connected_to (boost::shared_ptr<const IO>) const;
bool connected () const;
-
+ bool physically_connected () const;
+
nframes_t signal_latency() const { return _own_latency; }
nframes_t latency() const;
void set_port_latency (nframes_t);
diff --git a/libs/ardour/ardour/mute_master.h b/libs/ardour/ardour/mute_master.h
index 4ddb7075da..a0207f9817 100644
--- a/libs/ardour/ardour/mute_master.h
+++ b/libs/ardour/ardour/mute_master.h
@@ -25,11 +25,13 @@
#include "pbd/stateful.h"
#include <string>
+#include "ardour/session_handle.h"
+
namespace ARDOUR {
class Session;
-class MuteMaster : public PBD::Stateful
+class MuteMaster : public SessionHandleRef, public PBD::Stateful
{
public:
enum MutePoint {
@@ -69,7 +71,7 @@ class MuteMaster : public PBD::Stateful
void set_mute_points (MutePoint);
MutePoint mute_points() const { return _mute_point; }
- void set_solo_level (int32_t);
+ void set_solo_level (SoloLevel);
PBD::Signal0<void> MutePointChanged;
@@ -80,7 +82,7 @@ class MuteMaster : public PBD::Stateful
volatile MutePoint _mute_point;
volatile bool _self_muted;
volatile uint32_t _muted_by_others;
- volatile int32_t _solo_level;
+ volatile SoloLevel _solo_level;
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h
index ce4b88f8f2..cc37bf0821 100644
--- a/libs/ardour/ardour/port.h
+++ b/libs/ardour/ardour/port.h
@@ -116,6 +116,8 @@ public:
}
virtual void transport_stopped () {}
+ bool physically_connected () const;
+
static void set_engine (AudioEngine *);
PBD::Signal1<void,bool> MonitorInputChanged;
@@ -128,7 +130,7 @@ protected:
static nframes_t _port_offset;
static nframes_t _buffer_size;
-
+
static AudioEngine* _engine; ///< the AudioEngine
private:
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 5efb9c111b..b4a392c23b 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -129,6 +129,9 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
bool self_muted () const;
bool muted_by_others () const;
+ bool path_muted_by_others() const { return _path_muted_by_others > 0; }
+ void mod_path_muted_by_others (int delta);
+
void set_mute (bool yn, void* src);
void mod_muted_by_others (int delta);
@@ -138,7 +141,9 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
void set_solo (bool yn, void *src);
bool soloed () const { return self_soloed () || soloed_by_others (); }
- bool soloed_by_others () const { return !_solo_isolated && _soloed_by_others; }
+ bool soloed_by_others () const { return _soloed_by_others_upstream||_soloed_by_others_downstream; }
+ bool soloed_by_others_upstream () const { return _soloed_by_others_upstream; }
+ bool soloed_by_others_downstream () const { return _soloed_by_others_downstream; }
bool self_soloed () const { return _self_solo; }
void set_solo_isolated (bool yn, void *src);
@@ -372,8 +377,15 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
protected:
friend class Session;
+ void set_graph_level (int32_t);
+ int32_t graph_level() const { return _graph_level; }
+ void check_physical_connections ();
+ // this functions may ONLY be called during a route resort
+ bool physically_connected () const { return _physically_connected; }
+
void catch_up_on_solo_mute_override ();
- void mod_solo_by_others (int32_t);
+ void mod_solo_by_others_upstream (int32_t);
+ void mod_solo_by_others_downstream (int32_t);
bool has_external_redirects() const;
void curve_reallocate ();
void just_meter_input (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
@@ -411,7 +423,8 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
MeterPoint _meter_point;
uint32_t _phase_invert;
bool _self_solo;
- uint32_t _soloed_by_others;
+ uint32_t _soloed_by_others_upstream;
+ uint32_t _soloed_by_others_downstream;
uint32_t _solo_isolated;
bool _denormal_protection;
@@ -424,9 +437,12 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
boost::shared_ptr<MuteControllable> _mute_control;
boost::shared_ptr<MuteMaster> _mute_master;
MuteMaster::MutePoint _mute_points;
-
+ volatile uint32_t _path_muted_by_others;
+
std::string _comment;
bool _have_internal_generator;
+ bool _physically_connected; // valid ONLY during a route resort
+ int32_t _graph_level;
bool _solo_safe;
DataType _default_type;
FedBy _fed_by;
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 014b49b318..b399745187 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -415,6 +415,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void remove_route (boost::shared_ptr<Route>);
void resort_routes ();
void resort_routes_using (boost::shared_ptr<RouteList>);
+ void find_route_levels (boost::shared_ptr<RouteList>);
void set_remote_control_ids();
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 25a6ea4c98..2bd08cbcdf 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -306,6 +306,13 @@ namespace ARDOUR {
PreFaderListen
};
+ enum SoloLevel {
+ NotSoloed,
+ DownstreamSoloed,
+ UpstreamSoloed,
+ SelfSoloed
+ };
+
enum AutoConnectOption {
ManualConnect = 0x0,
AutoConnectPhysical = 0x1,