enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / libs / surfaces / mackie / surface_port.cc
index 6f243a54449fe06085049d2479d12ec9a9229d7b..ddc5a7b037e0fbd0deebbb0f56b33e8578b45047 100644 (file)
@@ -41,7 +41,7 @@
 #include "surface.h"
 #include "surface_port.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace PBD;
@@ -62,12 +62,12 @@ SurfacePort::SurfacePort (Surface& s)
                string out_name;
 
                if (_surface->mcp().device_info().extenders() > 0) {
-                       if (_surface->number() + 1 == _surface->mcp().device_info().master_position()) {
+                       if (_surface->number() == _surface->mcp().device_info().master_position()) {
                                in_name = X_("mackie control in");
                                out_name = X_("mackie control out");
                        } else {
-                               in_name = string_compose (X_("mackie control in ext %1"), _surface->number());
-                               out_name = string_compose (X_("mackie control out ext %1"), _surface->number());
+                               in_name = string_compose (X_("mackie control in ext %1"), (_surface->number() + 1));
+                               out_name = string_compose (X_("mackie control out ext %1"), _surface->number() + 1);
                        }
                } else {
                        in_name = X_("mackie control in");
@@ -99,7 +99,7 @@ SurfacePort::~SurfacePort()
                }
 
                if (_async_out) {
-                       _output_port->drain (10000);
+                       _output_port->drain (10000, 250000);
                        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("unregistering output port %1\n", _async_out->name()));
                        AudioEngine::instance()->unregister_port (_async_out);
                        _async_out.reset ((ARDOUR::Port*) 0);