From 6ad519ce8e8367f61187998dc8bb88dce60e7098 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 17 Sep 2016 13:46:30 +0200 Subject: VST threading: prevent concurrent effSetChunk and process() This is a potential fix for unreliable preset load/restore. (http://mixbus.harrisonconsoles.com/forum/thread-1970-post-21486.html#pid21486) Since a Glib Mutex can't be copy-constructed an explicit copy c'tor is needed. --- libs/ardour/ardour/vst_plugin.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/ardour/ardour/vst_plugin.h') diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index e56b9c005c..182b432692 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -40,6 +40,7 @@ class LIBARDOUR_API VSTPlugin : public Plugin { public: VSTPlugin (AudioEngine &, Session &, VSTHandle *); + VSTPlugin (const VSTPlugin& other); virtual ~VSTPlugin (); void activate (); @@ -119,6 +120,8 @@ protected: framepos_t _transport_frame; float _transport_speed; mutable std::map _parameter_defaults; + + Glib::Threads::Mutex _state_lock; }; } -- cgit v1.2.3