amend 01403dc (VST Pin connected)
authorRobin Gareus <robin@gareus.org>
Mon, 21 Sep 2015 21:01:38 +0000 (23:01 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 21 Sep 2015 21:01:59 +0000 (23:01 +0200)
libs/ardour/session_vst.cc

index 2f3b527b051a3803819e0cb4001a44850a793b09..d4ad70ba8c12d37f0e6c62a25b916d85b4304f8a 100644 (file)
@@ -126,16 +126,18 @@ intptr_t Session::vst_callback (
                // return value is 0 for <true> such that older versions
                // will always return true.
                if (!plug) {
-                       return 1;
+                       // we don't know.
+                       // but ardour always connects all buffers, so we're good
+                       return 0;
                }
                switch (value) {
                        case 0:
-                               if (index < plug->input_streams().n_audio()) {
+                               if (index < plug->plugin()->numInputs) {
                                        return 0;
                                }
                                break;
                        case 1:
-                               if (index < plug->output_streams().n_audio()) {
+                               if (index < plug->plugin()->numOutputs) {
                                        return 0;
                                }
                                break;