Juantelway / symbiosis-au-vst

Automatically exported from code.google.com/p/symbiosis-au-vst
0 stars 0 forks source link

setSampleRate and setBlockSize ineffective in VSTPlugIn::open() #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Startup wrapped plugin
2. Breakpoint in vst on setSampleRate
3. Breakpoint not hit

What is the expected output? What do you see instead?
Some plugins require a call to setSampleRate to function properly at startup

What version of the product are you using? On what operating system?
Symbiosis_v1_3_20130501

Please provide any additional information below.
Within void VSTPlugIn::open()
the code:
    setSampleRate(currentSampleRate);
    if (currentBlockSize != 0) {
        setBlockSize(currentBlockSize);
    }

is called before:
    dispatch(effOpen, 0, 0, 0, 0);
    openFlag = true;

so the check for openFlag in setSampleRate and setBlockSize fails and the VST 
functions are not called. Suggest changing to the following:

    dispatch(effOpen, 0, 0, 0, 0);
    openFlag = true;
    setSampleRate(currentSampleRate);
    if (currentBlockSize != 0) {
        setBlockSize(currentBlockSize);
    }

Original issue reported on code.google.com by matthew....@gmail.com on 13 Feb 2014 at 10:50