diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-11-07 12:46:09 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-11-07 12:46:09 +0000 |
| commit | 519777db8e31c7650ffe73969b4fffde69a79a94 (patch) | |
| tree | 671e6a51fb2d87e731be7a2b4225da9a0b193684 /rotord/src | |
| parent | 40af1e696717c1a287204c35596bd5685771054d (diff) | |
video bank normal speed
Diffstat (limited to 'rotord/src')
| -rw-r--r-- | rotord/src/rotor.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index fee29bc..78327f7 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -614,7 +614,7 @@ namespace Rotor { float ph=inputs[0]->get((Time_spec)frame); int seg=((int)ph); int wv=seg%attributes["filenames"]->vals.size(); - ph=fmod(ph,seg); + ph=seg==0?ph:fmod(ph,seg); if (clip_loaded!=wv){ if (load(media_path+attributes["filenames"]->vals[wv] )) { clip_loaded=wv; @@ -626,6 +626,7 @@ namespace Rotor { } } if (isLoaded){ + int tests=0; int wanted=0.0f; int thisframe=((Time_spec)frame).frame(); float clipframerate=(parameters["framerate"]->value==0.0f?player.get_framerate():parameters["framerate"]->value); @@ -645,8 +646,10 @@ namespace Rotor { Time_spec testframe=(Time_spec)frame.lastframe(); while ((int)inputs[0]->get(testframe)==seg&&testframe.frame()>0){ testframe=testframe.lastframe(); + } segment_start=testframe.time; + segment=seg; } wanted=(((Time_spec)frame).time-segment_start)*clipspeed*frame.framerate; lastframe=thisframe; |
