diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-10 16:23:54 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-10 16:23:54 +0000 |
commit | dd7caa01654dc58d3259eeed0e0f2b8ddb293b66 (patch) | |
tree | 58c4f85e4a8c4882f8213a686f4c5182f27af79f /libs/ardour/io.cc | |
parent | f7cef2016f737a7c80b5307d3d45d8065b9e8789 (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.cc | 7 |
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 |