summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-10 16:23:54 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-10 16:23:54 +0000
commitdd7caa01654dc58d3259eeed0e0f2b8ddb293b66 (patch)
tree58c4f85e4a8c4882f8213a686f4c5182f27af79f /libs/ardour/io.cc
parentf7cef2016f737a7c80b5307d3d45d8065b9e8789 (diff)
Optimise BufferSet::attach_buffers code to avoid memory allocation in the RT thread and speed things up a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@8490 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index 17a1da231b..21afdbae56 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -447,6 +447,7 @@ IO::ensure_ports (ChanCount count, bool clear, void* src)
change.after = _ports.count ();
change.type = IOChange::ConfigurationChanged;
this->changed (change, src); /* EMIT SIGNAL */
+ _buffers.attach_buffers (_ports);
setup_bundle ();
_session.set_dirty ();
}
@@ -1522,12 +1523,10 @@ IO::connected_to (boost::shared_ptr<const IO> other) const
void
IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, framepos_t end_frame, pframes_t nframes)
{
- BufferSet bufs;
-
/* don't read the data into new buffers - just use the port buffers directly */
- bufs.attach_buffers (_ports, nframes, 0);
- proc->run (bufs, start_frame, end_frame, nframes, true);
+ _buffers.get_jack_port_addresses (_ports, nframes, 0);
+ proc->run (_buffers, start_frame, end_frame, nframes, true);
}
void