first part of MIDI cut/copy/paste ; fix for input/output_streams of an IOProcessor...
[ardour.git] / libs / ardour / io_processor.cc
index 87d679bbacd231f9e8a2daa9a3379fe8a4ea543e..505d33a1b09b360fd2e55d42e42c233335f20da8 100644 (file)
@@ -69,7 +69,7 @@ IOProcessor::IOProcessor (Session& s, bool with_input, bool with_output,
 /* create an IOProcessor that proxies to an existing IO object */
 
 IOProcessor::IOProcessor (Session& s, boost::shared_ptr<IO> in, boost::shared_ptr<IO> out, 
-                         const string& proc_name, DataType dtype)
+                         const string& proc_name, DataType /*dtype*/)
        : Processor(s, proc_name)
        , _input (in)
        , _output (out)
@@ -220,18 +220,6 @@ IOProcessor::silence (nframes_t nframes)
        }
 }
 
-ChanCount
-IOProcessor::output_streams() const
-{
-       return _output ? _output->n_ports() : ChanCount::ZERO;
-}
-
-ChanCount
-IOProcessor::input_streams () const
-{
-       return _input ? _input->n_ports() : ChanCount::ZERO;
-}
-
 ChanCount
 IOProcessor::natural_output_streams() const
 {
@@ -265,3 +253,15 @@ IOProcessor::feeds (boost::shared_ptr<Route> other) const
 {
        return _output && _output->connected_to (other->input());
 }
+
+void
+IOProcessor::disconnect ()
+{
+       if (_input) {
+               _input->disconnect (this);
+       }
+
+       if (_output) {
+               _output->disconnect (this);
+       }
+}