summaryrefslogtreecommitdiff
path: root/gtk2_ardour/engine_dialog.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-01-17 22:38:48 +0100
committerRobin Gareus <robin@gareus.org>2015-01-17 22:42:20 +0100
commit49047e4dc9a35cb8f586204fdbe8cca55fc1026f (patch)
treea07ee180b769659573ff130cf5ff3eb5333eca1f /gtk2_ardour/engine_dialog.cc
parent03523f6703dbc9e422adcb8c346ab5c79d90a5c2 (diff)
consistent display of period-size.
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r--gtk2_ardour/engine_dialog.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index 2dfcf0088c..394a52b193 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -1036,15 +1036,25 @@ EngineControl::show_buffer_duration ()
uint32_t samples = atoi (bs_text); /* will ignore trailing text */
uint32_t rate = get_rate();
- /* Translators: "msecs" is ALWAYS plural here, so we do not
- need singular form as well.
- */
/* Developers: note the hard-coding of a double buffered model
in the (2 * samples) computation of latency. we always start
the audiobackend in this configuration.
*/
+ /* note to jack1 developers: ardour also always starts the engine
+ * in async mode (no jack2 --sync option) which adds an extra cycle
+ * of latency with jack2 (and *3 would be correct)
+ * The value can also be wrong if jackd is started externally..
+ *
+ * At the time of writing the ALSA backend always uses double-buffering *2,
+ * The Dummy backend *1, and who knows what ASIO really does :)
+ *
+ * So just display the period size, that's also what
+ * ARDOUR_UI::update_sample_rate() does for the status bar.
+ * (the statusbar calls AudioEngine::instance()->usecs_per_cycle()
+ * but still, that's the buffer period, not [round-trip] latency)
+ */
char buf[32];
- snprintf (buf, sizeof (buf), _("(%.1f msecs)"), (2 * samples) / (rate/1000.0));
+ snprintf (buf, sizeof (buf), _("(%.1f ms)"), (samples / (rate/1000.0f)));
buffer_size_duration_label.set_text (buf);
}