+#ifndef NDEBUG
+ bool r = AudioEngine::instance()->process_lock().trylock();
+ assert (!r && "trylock inside Delivery::configure_io");
+#endif
+
+ /* check configuration by comparison with our I/O port configuration, if appropriate.
+ see ::can_support_io_configuration() for comments
+ */
+
+ if (_role == Main) {
+
+ if (_output) {
+ if (_output->n_ports() != out) {
+ if (_output->n_ports() != ChanCount::ZERO) {
+ _output->ensure_io (out, false, this);
+ } else {
+ /* I/O not yet configured */
+ }
+ }
+ }
+
+ } else if (_role == Insert) {
+
+ if (_input) {
+ if (_input->n_ports() != in) {
+ if (_input->n_ports() != ChanCount::ZERO) {
+ fatal << _name << " programming error: configure_io called with " << in << " and " << out << " with " << _input->n_ports() << " input ports" << endmsg;
+ abort(); /*NOTREACHED*/
+ } else {
+ /* I/O not yet configured */
+ }
+ }
+ }
+
+ }
+
+ if (!Processor::configure_io (in, out)) {