+/** Write the backend port addresses from a PortSet into our data structures. This
+ * call assumes that attach_buffers() has already been called for the same PortSet.
+ * Does not allocate, so RT-safe BUT you can only call Port::get_buffer() from
+ * the process() callback tree anyway, so this has to be called in RT context.
+ */
+void
+BufferSet::get_backend_port_addresses (PortSet& ports, framecnt_t nframes)
+{
+ assert (_count == ports.count ());
+ assert (_available == ports.count ());
+ assert (_is_mirror);
+
+ assert (_buffers.size() == DataType::num_types);
+
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ BufferVec& v = _buffers[*t];
+
+ assert (v.size() == ports.num_ports (*t));
+
+ int i = 0;
+ for (PortSet::iterator p = ports.begin(*t); p != ports.end(*t); ++p) {
+ v[i] = &p->get_buffer (nframes);
+ ++i;
+ }
+ }
+}
+