View Full Version : Frame Rate
I've been implementing a plugin that has an emulation of a panel meter for someone. It looks fine to me, but they have said it sometimes looks slightly jerky. I would have thought the default 25fps should look fine, but I must admit I don't fully understand how the drawing happens. Is there a guarantee that all of those 25fps will appear on the screen, or is it possible that some frames may be dropped? They are testing on windows.
cerberus
01-07-2011, 03:00 PM
in the example plug-in: the meters refresh once per buffer block. when the block size / sample rate exceeds the frame rate, then updates will be slower.
i think that according to the vst 2.4 spec, a host only contacts a plug-in for updating once per block; so i don't know of any workaround.
Thanks, I left out some of the details... my meter is is custom control derived from IBitmapControl, The smoothing of the meter movement is done in the IsDirty() method of the control, and the smoothed value is then the value that is drawn in the Draw() method.
So I think the meter position should be updated at the frame rate as IsDirty is called just before drawing each frame.
sstillwell
01-07-2011, 06:51 PM
I've been implementing a plugin that has an emulation of a panel meter for someone. It looks fine to me, but they have said it sometimes looks slightly jerky. I would have thought the default 25fps should look fine, but I must admit I don't fully understand how the drawing happens. Is there a guarantee that all of those 25fps will appear on the screen, or is it possible that some frames may be dropped? They are testing on windows.
There is no "guarantee" that it will happen exactly 'n' frames per second. An OS timer (exact mechanism varies between operating systems) fires timer events at the rate specified...it's up to your plugin and the host to service those events fast enough. A well-written DAW host will rightfully decline to service window/UI events in order to make sure audio doesn't suffer.
If your plugin's video is not smooth when there's little or no load on the system, then you've got a problem with your UI code or the host is very uncooperative.
Or the system is slow as mud.
Scott
Thanks, that makes sense!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.