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 /gtk2_ardour | |
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 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/editor_audio_import.cc | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 9781bd01d9..cb1c22a8d0 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -81,6 +81,10 @@ #include "ardour/session_utils.h" #include "ardour/slave.h" +#ifdef WINDOWS_VST_SUPPORT +#include <fst.h> +#endif + #include "timecode/time.h" typedef uint64_t microseconds_t; @@ -1008,6 +1012,9 @@ If you still wish to quit, please use the\n\n\ halt_connection.disconnect (); AudioEngine::instance()->stop (); +#ifdef WINDOWS_VST_SUPPORT + fst_stop_threading(); +#endif quit (); } @@ -2916,7 +2923,13 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name, _session->set_clean (); } +#ifdef WINDOWS_VST_SUPPORT + fst_stop_threading(); +#endif flush_pending (); +#ifdef WINDOWS_VST_SUPPORT + fst_start_threading(); +#endif retval = 0; out: @@ -3343,10 +3356,6 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) PBD::ScopedConnection idle_connection; - if (count > 8) { - ARDOUR::GUIIdle.connect (idle_connection, MISSING_INVALIDATOR, boost::bind (&Gtkmm2ext::UI::flush_pending, this), gui_context()); - } - string template_path = add_route_dialog->track_template(); if (!template_path.empty()) { diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index a19a62b337..da70df5c15 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -632,7 +632,7 @@ Editor::embed_sndfiles (vector<string> paths, bool multifile, goto out; } - ARDOUR_UI::instance()->flush_pending (); + gtk_main_iteration(); } } |