View Single Post
Old 09-08-2020, 12:49 AM   #18
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,142
Default

Quote:
Originally Posted by Nonlinear View Post
So, now the question, why is updating the display controls in ProcessReplacing() interfering with pending redraw of the changed parameter control? Does this point back to a mutex lock issue - or something more obvious?
AFAIK IPlug only uses mutex locks to protect parameters from changing while processing audio. I don't think there are any mutex locks protecting the GUI. So I guess the scenario is:
  1. User clicks control, which toggles control value; it tries to update parameter, but it can't right now, so it waits for mutex to release.
  2. While mutex is still locked control is set to zero (i.e. control value changes, dirty flag is set, but don't push to plug).
  3. Mutex is released, so param is updated to control value from when user clicked on it.

In this scenario the parameter will have the value the user expects it to, but the control value will always end up being zero.
Tale is offline   Reply With Quote