Use ID::to_s() in libardour instead of ID::print()
[ardour.git] / libs / ardour / diskstream.cc
index 6eac0c1cd94d4c1631d7f4da32756315c1dafb93..cf6db56af98fe4688cc54b329155a9c53dd8eab8 100644 (file)
@@ -46,7 +46,7 @@
 #include "ardour/session.h"
 #include "ardour/track.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 #include <locale.h>
 
 using namespace std;
@@ -148,6 +148,12 @@ Diskstream::~Diskstream ()
         delete deprecated_io_node;
 }
 
+bool
+Diskstream::non_layered () const
+{
+       return _session.config.get_layered_record_mode();
+}
+
 void
 Diskstream::set_track (Track* t)
 {
@@ -260,6 +266,16 @@ Diskstream::set_capture_offset ()
                _capture_offset = 0;
                break;
        }
+#ifdef MIXBUS
+       framecnt_t port_offset;
+       if (_track->mixbus_internal_bounce (port_offset)) {
+               /* _capture_offset may become negative, but the sum
+                * _capture_offset + existing_material_offset
+                * will be postive.
+                */
+               _capture_offset -= port_offset;
+       }
+#endif
 
         DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("%1: using IO latency, capture offset set to %2 with style = %3\n", name(), _capture_offset, enum_2_string (_alignment_style)));
 }
@@ -466,8 +482,7 @@ Diskstream::get_state ()
        node->add_property ("flags", enum_2_string (_flags));
        node->add_property ("playlist", _playlist->name());
        node->add_property("name", _name);
-       id().print (buf, sizeof (buf));
-       node->add_property("id", buf);
+       node->add_property ("id", id ().to_s ());
        snprintf (buf, sizeof(buf), "%f", _visible_speed);
        node->add_property ("speed", buf);
         node->add_property ("capture-alignment", enum_2_string (_alignment_choice));