-int
-MidiTrack::deprecated_use_diskstream_connections ()
-{
- if (_diskstream->deprecated_io_node == 0) {
- return 0;
- }
-
- const XMLProperty* prop;
- XMLNode& node (*_diskstream->deprecated_io_node);
-
- /* don't do this more than once. */
-
- _diskstream->deprecated_io_node = 0;
-
- set_input_minimum (-1);
- set_input_maximum (-1);
- set_output_minimum (-1);
- set_output_maximum (-1);
-
- if ((prop = node.property ("gain")) != 0) {
- set_gain (atof (prop->value().c_str()), this);
- _gain = _desired_gain;
- }
-
- if ((prop = node.property ("input-connection")) != 0) {
- Connection* c = _session.connection_by_name (prop->value());
-
- if (c == 0) {
- PBD::error << string_compose(_("Unknown connection \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
-
- if ((c = _session.connection_by_name (_("in 1"))) == 0) {
- PBD::error << _("No input connections available as a replacement")
- << endmsg;
- return -1;
- } else {
- PBD::info << string_compose (_("Connection %1 was not available - \"in 1\" used instead"), prop->value())
- << endmsg;
- }
- }
-
- use_input_connection (*c, this);
-
- } else if ((prop = node.property ("inputs")) != 0) {
- if (set_inputs (prop->value())) {
- PBD::error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
- return -1;
- }
- }
-
- return 0;
-}