+
+ /* If we have a previous position for the custom meter, try to put it there */
+ if (_custom_meter_position_noted) {
+ boost::shared_ptr<Processor> after = _processor_after_last_custom_meter.lock ();
+
+ if (after) {
+ ProcessorList::iterator i = find (_processors.begin(), _processors.end(), after);
+ if (i != _processors.end ()) {
+ _processors.remove (_meter);
+ _processors.insert (i, _meter);
+ }
+ } else if (_last_custom_meter_was_at_end) {
+ _processors.remove (_meter);
+ _processors.push_back (_meter);
+ }
+ }
+ }
+
+ /* Set up the meter for its new position */
+
+ ProcessorList::iterator loc = find (_processors.begin(), _processors.end(), _meter);
+
+ ChanCount m_in;
+
+ if (loc == _processors.begin()) {
+ m_in = _input->n_ports();
+ } else {
+ ProcessorList::iterator before = loc;
+ --before;
+ m_in = (*before)->output_streams ();