olilarkin / wdl-ol

Enhanced version of Cockos' iPlug - A simple-to-use C++ framework for developing cross platform audio plugins and targeting multiple plugin APIs with the same code. VST / VST3 / Audiounit / RTAS / AAX (Native) formats supported. NOTE: THIS IS OBSOLETE, PLEASE SEE IPLUG2:
https://github.com/iplug2
935 stars 187 forks source link

SetLatency produces a crash in the VST host (only with VST3) #66

Open josephernest opened 7 years ago

josephernest commented 7 years ago

If you do:

python duplicate.py IPlugEffect ABC Test
cd ABC
nano ABC/ABC.cpp                # just add SetLatency(8192);
./makedist-mac.command

Launch Reaper64 (for example): the VST3 crashes Reaper. VST and AU are working though.


Here is the ABC.cpp code:


ABC::ABCIPlugInstanceInfo instanceInfo)
  : IPLUG_CTOR(kNumParams, kNumPrograms, instanceInfo), mGain(1.)
{
   /*
   [...]
   */
  AttachGraphics(pGraphics);

  SetLatency(8192);

  //MakePreset("preset 1", ... );
  MakeDefaultPreset((char *) "-", kNumPrograms);
}
josephernest commented 7 years ago

Do you think SetLatency(...); should be put elsewhere than in the constructor ABC::ABCIPlugInstanceInfo instanceInfo) : IPLUG_CTOR(kNumParams, kNumPrograms, instanceInfo) @olilarkin ?