summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-12-03 22:29:25 +0100
committerRobin Gareus <robin@gareus.org>2018-12-03 22:43:02 +0100
commitd1cf21634f6a959618a18c25800a4c9bd32bfdc4 (patch)
treee4a4886cf0e0051030b796cca5ed07977384a8f4 /libs/ardour/plugin_insert.cc
parentb285559767e21aae4467270590f048c3263fd742 (diff)
Special case Mixbus Chanstrip for load calculation
These processors don't have a UI, so their load stats are not easily visible. The stats can still be queried via Lua API or DSP-load overview window, so we retain this for debug builds.
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 9cb654bcb4..3b87b659a6 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -1226,7 +1226,13 @@ PluginInsert::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
}
if (_pending_active) {
+#if defined MIXBUS && !defined NDEBUG
+ if (!is_channelstrip ()) {
+ _timing_stats.start ();
+ }
+#else
_timing_stats.start ();
+#endif
/* run as normal if we are active or moving from inactive to active */
if (_session.transport_rolling() || _session.bounce_processing()) {
@@ -1235,7 +1241,13 @@ PluginInsert::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
Glib::Threads::Mutex::Lock lm (control_lock(), Glib::Threads::TRY_LOCK);
connect_and_run (bufs, start_sample, end_sample, speed, nframes, 0, lm.locked());
}
+#if defined MIXBUS && !defined NDEBUG
+ if (!is_channelstrip ()) {
+ _timing_stats.update ();
+ }
+#else
_timing_stats.update ();
+#endif
} else {
_timing_stats.reset ();
@@ -3200,6 +3212,17 @@ PluginInsert::end_touch (uint32_t param_id)
}
bool
+PluginInsert::provides_stats () const
+{
+#if defined MIXBUS && !defined NDEBUG
+ if (is_channelstrip () || !display_to_user ()) {
+ return false;
+ }
+#endif
+ return true;
+}
+
+bool
PluginInsert::get_stats (uint64_t& min, uint64_t& max, double& avg, double& dev) const
{
/* TODO: consider taking a try/lock: Don't run concurrently with