From 7872e4033f236356f0b5a10d0a4eb889adca52d2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 9 Sep 2017 03:07:01 +0200 Subject: LV2/midnam tweaks - fix race conditions * Emit signal once midnam was actually updated * only re-read midnam if was it changed. This allows idempotent calls to read_midnam() - from the same thread. At session-load a synth-plugin may load a soundfont in the background and emit midnam_update() after the synth was initialized but before the GUI thread connects to the signal. By making the call idempotent the GUI can call read_midnam() after connecting to the signal to catch up. --- libs/ardour/ardour/plugin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/ardour/ardour/plugin.h') diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 52fbc71c68..f51f34b099 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -182,6 +182,7 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent virtual bool read_midnam () { return false; } virtual std::string midnam_model () { return ""; } PBD::Signal0 UpdateMidnam; + PBD::Signal0 UpdatedMidnam; virtual bool knows_bank_patch () { return false; } virtual uint32_t bank_patch (uint8_t chn) { return UINT32_MAX; } -- cgit v1.2.3