mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
jump to multiple of framerate
This commit is contained in:
@@ -292,6 +292,12 @@ public class Movie extends PImage implements PConstants {
|
||||
initSink();
|
||||
}
|
||||
|
||||
// Round the time to a multiple of the source framerate, in
|
||||
// order to eliminate stutter. Suggested by Daniel Shiffman
|
||||
float fps = getSourceFrameRate();
|
||||
int frame = (int)(where * fps);
|
||||
where = frame / fps;
|
||||
|
||||
boolean res;
|
||||
long pos = Video.secToNanoLong(where);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user