View Single Post
Old 07-14-2018, 01:35 PM   #7
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

if this is just a visual effect - an animation, you don't need another thread, and you definitely don't need to use the audio thread.

create a member variable mCountdown in your IControl, initialise it to 0 and on MouseUp/whatever set it to a certain number of frames e.g., if IGraphics FPS = 25 (the default) and you want the animation to continue for 1 sec, you would set mCountdown to 25.

override IsDirty to do your animation... I think this would work...

bool MyControl::IsDirty()
{
if( mCountdown--) {
// do animation

return true;
}

return mDirty;
}
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote