Respond to MMC even when synced to JACK. Fixes #3700.
[ardour.git] / libs / ardour / session_vst.cc
index 7f13d3e18bfebf47fd74d08b25a82caeee9b68a5..2aa873c6e641cd8df324e4f3150d8d8026575649 100644 (file)
@@ -58,11 +58,11 @@ long Session::vst_callback (AEffect* effect,
        if (effect && effect->user) {
                plug = (VSTPlugin*) (effect->user);
                session = &plug->session();
-               SHOW_CALLBACK ("am callback 0x%x, opcode = %ld, plugin = \"%s\" ", pthread_self(), opcode, plug->name());
+               SHOW_CALLBACK ("am callback 0x%x, opcode = %ld, plugin = \"%s\" ", (int) pthread_self(), opcode, plug->name());
        } else {
                plug = 0;
                session = 0;
-               SHOW_CALLBACK ("am callback 0x%x, opcode = %ld", pthread_self(), opcode);
+               SHOW_CALLBACK ("am callback 0x%x, opcode = %ld", (int) pthread_self(), opcode);
        }
 
        switch(opcode){
@@ -70,8 +70,8 @@ long Session::vst_callback (AEffect* effect,
        case audioMasterAutomate:
                SHOW_CALLBACK ("amc: audioMasterAutomate\n");
                // index, value, returns 0
-               if (effect) {
-                       effect->setParameter (effect, index, opt);
+               if (plug) {
+                       plug->set_parameter (index, opt);
                }
                return 0;
 
@@ -107,6 +107,9 @@ long Session::vst_callback (AEffect* effect,
        case audioMasterWantMidi:
                SHOW_CALLBACK ("amc: audioMasterWantMidi\n");
                // <value> is a filter which is currently ignored
+               if (plug) {
+                       plug->get_info()->n_inputs.set_midi (1);
+               }
                return 0;
 
        case audioMasterGetTime:
@@ -345,7 +348,7 @@ long Session::vst_callback (AEffect* effect,
                return 0;
 
        default:
-               SHOW_CALLBACK ("VST master dispatcher: undefed: %d\n", opcode);
+               SHOW_CALLBACK ("VST master dispatcher: undefed: %ld\n", opcode);
                break;
        }