+ for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
+ (*i)->flush ();
+ }
+}
+
+void
+PluginInsert::connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now)
+{
+ // Calculate if, and how many frames we need to collect for analysis
+ framecnt_t collect_signal_nframes = (_signal_analysis_collect_nframes_max -
+ _signal_analysis_collected_nframes);
+ if (nframes < collect_signal_nframes) { // we might not get all frames now
+ collect_signal_nframes = nframes;
+ }
+
+ ChanCount const in_streams = input_streams ();
+ ChanCount const out_streams = output_streams ();
+
+ ChanMapping in_map (in_streams);
+ ChanMapping out_map (out_streams);
+ bool valid;
+ if (_match.method == Split) {
+ /* fix the input mapping so that we have maps for each of the plugin's inputs */
+ in_map = ChanMapping (natural_input_streams ());
+
+ /* copy the first stream's buffer contents to the others */
+ /* XXX: audio only */
+ uint32_t first_idx = in_map.get (DataType::AUDIO, 0, &valid);
+ if (valid) {
+ Sample const * mono = bufs.get_audio (first_idx).data (offset);
+ for (uint32_t i = in_streams.n_audio(); i < natural_input_streams().n_audio(); ++i) {
+ memcpy (bufs.get_audio (in_map.get (DataType::AUDIO, i, &valid)).data (offset), mono, sizeof (Sample) * nframes);
+ }
+ }
+ }