summaryrefslogtreecommitdiff
path: root/libs/ardour/port_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/port_manager.cc')
-rw-r--r--libs/ardour/port_manager.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc
index 8d9f47cf84..75d93af320 100644
--- a/libs/ardour/port_manager.cc
+++ b/libs/ardour/port_manager.cc
@@ -420,12 +420,13 @@ PortManager::register_port (DataType dtype, const string& portname, bool input,
throw PortRegistrationFailure (string_compose ("unable to create port '%1': %2", portname, _("(unknown type)")));
}
+ newport->set_buffer_size (AudioEngine::instance()->samples_per_cycle());
+
RCUWriter<Ports> writer (ports);
boost::shared_ptr<Ports> ps = writer.get_copy ();
ps->insert (make_pair (make_port_name_relative (portname), newport));
/* writer goes out of scope, forces update */
-
}
catch (PortRegistrationFailure& err) {
@@ -1353,3 +1354,14 @@ PortManager::fill_midi_port_info_locked ()
midi_info_dirty = false;
}
+
+void
+PortManager::set_port_buffer_sizes (pframes_t n)
+{
+
+ boost::shared_ptr<Ports> all = ports.reader();
+
+ for (Ports::iterator p = all->begin(); p != all->end(); ++p) {
+ p->second->set_buffer_size (n);
+ }
+}