From dfdf9a35f1e990c45f35632eb993eb67f4f7abf8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 22 Feb 2014 02:44:34 +0100 Subject: resolve gtk + VST threading issues while (gtk_events_pending()) gtk_main_iteration(); never returns as long as there's a idle call registered somewhere (and it's not called from an idle callback itself) --- libs/ardour/session_vst.cc | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'libs/ardour/session_vst.cc') diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index 461934b5f4..61805be2cd 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -28,6 +28,9 @@ #include "ardour/windows_vst_plugin.h" #include "ardour/vestige/aeffectx.h" #include "ardour/vst_types.h" +#ifdef WINDOWS_VST_SUPPORT +#include +#endif #include "i18n.h" @@ -100,26 +103,9 @@ intptr_t Session::vst_callback ( case audioMasterIdle: SHOW_CALLBACK ("amc: audioMasterIdle\n"); - // call application idle routine (this will - // call effEditIdle for all open editors too) - -#if 0 // TODO -> emit to GUI OR better delegete to fst/fst - - // This allows the main GUI window to update if needed. - // Some plugins take over the GUI event loop - // which causes the main GUI to freeze while the plugin GUI continues to run. This code - // prevents the main GUI from being frozen. - - do { -#ifdef GDK_WINDOWING_X11 - gtk_main_iteration_do(false); -#else - gtk_main_iteration() -#endif - } while (gtk_events_pending()); +#ifdef WINDOWS_VST_SUPPORT + fst_audio_master_idle(); #endif - printf("audioMasterIdle\n"); - if (effect) { effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f); } -- cgit v1.2.3