+ ChanCount const in_streams = input_streams ();
+ ChanCount const out_streams = output_streams ();
+
+ ChanMapping in_map (in_streams);
+ ChanMapping out_map (out_streams);
+
+ 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 */
+ Sample const * mono = bufs.get_audio (in_map.get (DataType::AUDIO, 0)).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)).data (offset), mono, sizeof (Sample) * nframes);
+ }
+ }
+
+ if (_match.method == Hide) {
+ /* Silence the hidden input buffers */
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ for (uint32_t i = in_streams.get(*t); i < (in_streams.get(*t) + _match.hide.get(*t)); ++i) {
+ bufs.get(*t, i).silence (nframes);
+ }
+ }
+ }