diff options
author | Robin Gareus <robin@gareus.org> | 2014-02-22 02:44:34 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-02-22 03:11:48 +0100 |
commit | dfdf9a35f1e990c45f35632eb993eb67f4f7abf8 (patch) | |
tree | a74a58b39c8f08859c547b8e0f6c8a443cba8bf2 /libs/ardour/session_vst.cc | |
parent | b3154e8ed6b5bb62acdc4b5a72133ceaeab7e53e (diff) |
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)
Diffstat (limited to 'libs/ardour/session_vst.cc')
-rw-r--r-- | libs/ardour/session_vst.cc | 24 |
1 files changed, 5 insertions, 19 deletions
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 <fst.h> +#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); } |