LADSPA/SWH/Vocoder: fixed instantiation on Win32

Due to the nature of DLL files LADSPA plugins need a little extra care
when building for Win32, otherwise they can't be instantiated and won't
be available.

Closes #356.
This commit is contained in:
Tobias Doerffel
2014-02-20 22:01:58 +01:00
parent e6883e7743
commit 0e8d47cfe0

View File

@@ -443,8 +443,15 @@ _fini() {
/* Return a descriptor of the requested plugin type. Only one plugin
type is available in this library. */
_WINDOWS_DLL_EXPORT_
const LADSPA_Descriptor *
ladspa_descriptor(unsigned long Index) {
#ifdef WIN32
if (bIsFirstTime) {
_init();
bIsFirstTime = 0;
}
#endif
if (Index == 0)
return g_psDescriptor;
else