+ assert (inplace_bufs.count () >= natural_input_streams () + _configured_out);
+
+ /* build used-output map */
+ for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i, ++pc) {
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ for (uint32_t out = 0; out < natural_output_streams().get (*t); ++out) {
+ bool valid;
+ uint32_t out_idx = out_map[pc].get (*t, out, &valid);
+ if (valid) {
+ used_outputs.set (*t, out_idx, 1); // mark as used
+ }
+ }
+ }
+ }
+ /* copy thru data to outputs before processing in-place */
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ for (uint32_t out = 0; out < bufs.count().get (*t); ++out) {
+ bool valid;
+ uint32_t in_idx = thru_map.get (*t, out, &valid);
+ if (valid) {
+ uint32_t m = out + natural_input_streams ().get (*t);
+ inplace_bufs.get (*t, m).read_from (bufs.get (*t, in_idx), nframes, offset, offset);
+ used_outputs.set (*t, out, 1); // mark as used
+ }
+ }
+ }
+
+ pc = 0;