LV2/midnam tweaks - fix race conditions
authorRobin Gareus <robin@gareus.org>
Sat, 9 Sep 2017 01:07:01 +0000 (03:07 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 9 Sep 2017 01:08:46 +0000 (03:08 +0200)
commit7872e4033f236356f0b5a10d0a4eb889adca52d2
tree4dfdca42959c925faa3f97d7544125a22b5c125a
parentb43fd4ad0e3b45dd44e0d5d28c6b696cfd16583e
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/lv2_plugin.h
libs/ardour/ardour/plugin.h
libs/ardour/lv2_plugin.cc