Fix SNAFU with auto-connect. Fixes #3379.
authorCarl Hetherington <carl@carlh.net>
Wed, 4 Aug 2010 15:42:45 +0000 (15:42 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 4 Aug 2010 15:42:45 +0000 (15:42 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7536 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audioengine.cc
libs/ardour/session.cc

index c40180e91db372e005c3d75d820be7cb667363d9..3453deea5c700db8ab027651c05e823b0bfd5223 100644 (file)
@@ -1166,16 +1166,22 @@ AudioEngine::get_physical (DataType type, unsigned long flags, vector<string>& p
        }
 }
 
+/** Get physical ports for which JackPortIsOutput is set; ie those that correspond to
+ *  a physical input connector.
+ */
 void
 AudioEngine::get_physical_inputs (DataType type, vector<string>& ins)
 {
-       get_physical (type, JackPortIsInput, ins);
+       get_physical (type, JackPortIsOutput, ins);
 }
 
+/** Get physical ports for which JackPortIsInput is set; ie those that correspond to
+ *  a physical output connector.
+ */
 void
 AudioEngine::get_physical_outputs (DataType type, vector<string>& outs)
 {
-       get_physical (type, JackPortIsOutput, outs);
+       get_physical (type, JackPortIsInput, outs);
 }
 
 void
index 6e557e6d49ea0648931eb7fafc764493d89d6162..79781236951b6c9ecb0714462312996dcd84cafe 100644 (file)
@@ -431,11 +431,8 @@ Session::when_engine_running ()
        vector<string> inputs[DataType::num_types];
        vector<string> outputs[DataType::num_types];
        for (uint32_t i = 0; i < DataType::num_types; ++i) {
-               /* the engine's terms for inputs and outputs are reversed from what the
-                  code below expects.
-                */
-               _engine.get_physical_outputs (DataType (DataType::Symbol (i)), inputs[i]);
-               _engine.get_physical_inputs (DataType (DataType::Symbol (i)), outputs[i]);
+               _engine.get_physical_inputs (DataType (DataType::Symbol (i)), inputs[i]);
+               _engine.get_physical_outputs (DataType (DataType::Symbol (i)), outputs[i]);
        }
 
        /* Create a set of Bundle objects that map