Don't truncate pretty port names when setting up port bundles
authorTim Mayberry <mojofunk@gmail.com>
Fri, 28 Aug 2015 00:33:01 +0000 (10:33 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Fri, 28 Aug 2015 00:43:17 +0000 (10:43 +1000)
This was causing truncation in the mixer strip input/output popup menus and the
channel number identifier was truncated

libs/ardour/session.cc

index 6968f9ba284d14d514e71049608a655edb501e78..29e0777cfa1aa947b42a5217397766fcd4272c13 100644 (file)
@@ -811,10 +811,10 @@ Session::setup_bundles ()
        /* mono output bundles */
 
        for (uint32_t np = 0; np < outputs[DataType::AUDIO].size(); ++np) {
-               char buf[32];
+               char buf[64];
                std::string pn = _engine.get_pretty_name_by_name (outputs[DataType::AUDIO][np]);
                if (!pn.empty()) {
-                       snprintf (buf, sizeof (buf), _("out %s"), pn.substr(0,12).c_str());
+                       snprintf (buf, sizeof (buf), _("out %s"), pn.c_str());
                } else {
                        snprintf (buf, sizeof (buf), _("out %" PRIu32), np+1);
                }
@@ -845,10 +845,10 @@ Session::setup_bundles ()
        /* mono input bundles */
 
        for (uint32_t np = 0; np < inputs[DataType::AUDIO].size(); ++np) {
-               char buf[32];
+               char buf[64];
                std::string pn = _engine.get_pretty_name_by_name (inputs[DataType::AUDIO][np]);
                if (!pn.empty()) {
-                       snprintf (buf, sizeof (buf), _("in %s"), pn.substr(0,12).c_str());
+                       snprintf (buf, sizeof (buf), _("in %s"), pn.c_str());
                } else {
                        snprintf (buf, sizeof (buf), _("in %" PRIu32), np+1);
                }