show no/inplace info in Pin Dialog (debug builds only)
authorRobin Gareus <robin@gareus.org>
Tue, 19 Apr 2016 17:02:50 +0000 (19:02 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 19 Apr 2016 17:03:16 +0000 (19:03 +0200)
.. also only show latency (relevant for thru) in debug-builds.

gtk2_ardour/plugin_pin_dialog.cc

index e192fad4ba52a93888d0e335204a6d0bd27bf1b1..fcd6cf19c1e98d69cd474ce2e0f07d85cbce1e83 100644 (file)
@@ -973,15 +973,22 @@ PluginPinDialog::darea_expose_event (GdkEventExpose* ev)
        cairo_set_source_rgba (cr, 1., 1., 1., 1.);
        pango_cairo_show_layout (cr, layout->gobj ());
 
-       if (_pi->signal_latency () > 0) {
-               // TODO: this needs a better location also format to msec (and cache)
+#ifndef NDEBUG
+       if (_pi->signal_latency () > 0 || !_pi->inplace()) {
                layout->set_width ((_innerwidth - 2 * _pin_box_size) * PANGO_SCALE);
-               layout->set_text (string_compose (_("Latency %1 spl"), _pi->signal_latency ()));
+               if (_pi->signal_latency () > 0 && !_pi->inplace()) {
+                       layout->set_text (string_compose (_("Latency %1 spl%2 %3"), _pi->signal_latency (), ", ", _("no-inplace")));
+               } else if (_pi->signal_latency () > 0) {
+                       layout->set_text (string_compose (_("Latency %1 spl"), _pi->signal_latency ()));
+               } else {
+                       layout->set_text (_("no-inplace"));
+               }
                layout->get_pixel_size (text_width, text_height);
                cairo_move_to (cr, _margin_x + _pin_box_size * .5, _margin_y + 2);
                cairo_set_source_rgba (cr, 1., 1., 1., 1.);
                pango_cairo_show_layout (cr, layout->gobj ());
        }
+#endif
 
        if (_pi->strict_io () && !Profile->get_mixbus ()) {
                layout->set_text (_("Strict I/O"));