optimize some performance bottlenecks; remove jack_nframes_t that crept back into...
[ardour.git] / libs / ardour / io.cc
index b7472781a80ae2c5fb7fa3ca51182f61bda89f32..67f365a400ab6b61316463f15b506bb2fb08b548 100644 (file)
@@ -27,6 +27,7 @@
 #include <glibmm/thread.h>
 
 #include <pbd/xml++.h>
+#include <pbd/replace_all.h>
 
 #include <ardour/audioengine.h>
 #include <ardour/io.h>
@@ -1443,7 +1444,7 @@ IO::load_automation (string path)
 
        while (in.getline (line, sizeof(line), '\n')) {
                char type;
-               jack_nframes_t when;
+               nframes_t when;
                double value;
 
                if (++linecnt == 1) {
@@ -1817,6 +1818,12 @@ IO::set_name (string name, void* src)
                return 0;
        }
 
+       /* replace all colons in the name. i wish we didn't have to do this */
+
+       if (replace_all (name, ":", "-")) {
+               warning << _("you cannot use colons to name objects with I/O connections") << endmsg;
+       }
+
        for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) {
                string current_name = i->short_name();
                current_name.replace (current_name.find (_name), _name.length(), name);