Browse Source

nasty hack to try workaround zyn issue with multiple instances

tags/1.9.4
falkTX 10 years ago
parent
commit
bd01b36278
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      source/modules/native-plugins/zynaddsubfx-synth.cpp

+ 15
- 0
source/modules/native-plugins/zynaddsubfx-synth.cpp View File

@@ -552,6 +552,9 @@ public:
fMaster->partonoff(i, 1);

sPrograms.init();

// create instance if needed
getGlobalMutex();
}

~ZynAddSubFxPlugin() override
@@ -627,6 +630,8 @@ protected:
return;
}

const CarlaMutexLocker csm(getGlobalMutex());

for (uint32_t i=0; i < midiEventCount; ++i)
{
const NativeMidiEvent* const midiEvent(&midiEvents[i]);
@@ -765,6 +770,16 @@ private:

ZynAddSubFxThread fThread;

// -------------------------------------------------------------------

static CarlaMutex& getGlobalMutex() noexcept
{
static CarlaMutex m;
return m;
}

// -------------------------------------------------------------------

public:
static NativePluginHandle _instantiate(const NativeHostDescriptor* host)
{


Loading…
Cancel
Save