mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 01:29:43 +02:00
Better fix for bug #1083
I realized after the last commit that it was probably just a VST version issue. The effCanBeAutomated opcode was only added for VST version 2 and, at least the steroizer effect attached to the but, was built for a VST version before that.
This commit is contained in:
parent
0251dc54e0
commit
6a95aae8b3
@ -2180,6 +2180,9 @@ bool VSTEffect::Load()
|
||||
// Open the plugin
|
||||
callDispatcher(effOpen, 0, 0, NULL, 0.0);
|
||||
|
||||
// Get the VST version the plugin understands
|
||||
mVstVersion = callDispatcher(effGetVstVersion, 0, 0, NULL, 0);
|
||||
|
||||
// Set it again in case plugin ignored it before the effOpen
|
||||
callDispatcher(effSetSampleRate, 0, 0, NULL, 48000.0);
|
||||
callDispatcher(effSetBlockSize, 0, 512, NULL, 0);
|
||||
@ -2594,10 +2597,7 @@ float VSTEffect::callGetParameter(int index)
|
||||
|
||||
void VSTEffect::callSetParameter(int index, float value)
|
||||
{
|
||||
// LL: Apparently, some VSTs do not respond to this call, even though
|
||||
// the parameters can be automated.
|
||||
// See bug #1083.
|
||||
// if (callDispatcher(effCanBeAutomated, 0, index, NULL, 0.0))
|
||||
if (mVstVersion == 0 || callDispatcher(effCanBeAutomated, 0, index, NULL, 0.0))
|
||||
{
|
||||
mAEffect->setParameter(mAEffect, index, value);
|
||||
|
||||
|
@ -259,6 +259,7 @@ private:
|
||||
wxString mDescription;
|
||||
int mVersion;
|
||||
bool mInteractive;
|
||||
int mVstVersion;
|
||||
|
||||
static intptr_t mCurrentEffectID;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user