View Single Post
Old 03-17-2017, 12:50 PM   #9
Eeli
Human being with feelings
 
Join Date: Mar 2017
Posts: 1
Default

Hi! Any progress on this, anyone? I came across this issue just a few days ago so it was cool to find some discussion on it.

In my plugin (Windows 64-bit VST), I tried taking OnParamChange out of the lock as suggested here, to no effect. However, turning off the "Notify about parameter changes" in FL "resolved" the issue as Nowhk pointed out, so I made this change in IPlug:

Code:
void IPlugBase::SetParameterFromGUI(int idx, double normalizedValue)
{
/* // Original: 
  Trace(TRACELOC, "%d:%f", idx, normalizedValue);
  WDL_MutexLock lock(&mMutex);
  GetParam(idx)->SetNormalized(normalizedValue);
  InformHostOfParamChange(idx, normalizedValue);
  OnParamChange(idx);
  */

	Trace(TRACELOC, "%d:%f", idx, normalizedValue);
	{ WDL_MutexLock lock(&mMutex);
	GetParam(idx)->SetNormalized(normalizedValue);
	OnParamChange(idx);
	}
	InformHostOfParamChange(idx, normalizedValue);
}
That is, I took InformHostOfParamChange outside the lock, and now the plug seems to run smoothly in FL (haven't tried any other host!). Can someone tell me if and why this is a bad idea?
Eeli is offline   Reply With Quote