fix deep obscure problem with loading multiple backends on OS X
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 1 Oct 2014 02:56:57 +0000 (22:56 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 1 Oct 2014 02:57:05 +0000 (22:57 -0400)
commit3d12a4da82100466f1e5e286260759f07c2e657a
tree3306cb2ea55b3fed9e645b4bba4fcfd0904c1a76
parentcd60fd9dfe28d91de9b4b4f261347f25a06c7720
fix deep obscure problem with loading multiple backends on OS X

all backends export a symbol declared as "extern "C" ARDOURBACKEND_API ARDOUR::AudioBackendInfo* descriptor ()".
dlopen'ing the backend apparently pushes the symbol "descriptor" into the single flat global namespace that we use
to be like other unix-like systems. this means that if a backend calls its OWN function named "descriptor", it
is indeterminate which one it will be, since the symbol will refer to the function first loaded by the runtime
linker. If the backend is not the first one discovered, this call to its own "descriptor" function will invoke
the function defined by another backend, even though these are supposed to have local scope only according
to our arguments to dlopen().

This fix doesn't try to fix the linker or namespace - it just makes sure that the WavesAudio backend doesn't
invoke its own descriptor() function, which it never really needed to do anyway.
libs/backends/wavesaudio/waves_audiobackend.cc
libs/backends/wavesaudio/waves_audiobackend.h