From 8790ba996bccce3b77394e2d24e8debc9a21d6dc Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 6 Nov 2013 18:12:12 +0000 Subject: video bank --- rotord/src/rotor.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 4c71c84..ca3e5d2 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -131,7 +131,7 @@ namespace Rotor { Frame_spec(int _frame,float _framerate,float _duration,int _w,int _h,Audio_frame *_audio=nullptr) { time=((float)_frame)/_framerate; framerate=_framerate; duration=_duration; w=_w; h=_h;audio=_audio;}; int h,w; - Frame_spec lastframe(){ + Frame_spec lastframe() const{ return Frame_spec(time-(1.0f/framerate),framerate,duration,w,h); } }; @@ -218,7 +218,7 @@ namespace Rotor { } else intVal=0; } - void init(const std::vector &_vals){ + void init(const std::vector &_vals){ vals=_vals; string s; for (auto v:vals) s=s+v+" "; @@ -228,7 +228,7 @@ namespace Rotor { int intVal; string type; std::vector vals; - + }; class Node{ public: @@ -253,11 +253,11 @@ namespace Rotor { attributes[_attr]=new Attribute(_desc,_title,_value,_vals,_type); }; void create_attribute(string *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector _vals={},std::string _type="string") { - create_attribute(_attr,_desc,_title,_value,_vals,_type); + create_attribute(_attr,_desc,_title,_value,_vals,_type); alias=&(attributes[_attr]->value); }; void create_attribute(int *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector _vals={},std::string _type="string") { - create_attribute(_attr,_desc,_title,_value,_vals,_type); + create_attribute(_attr,_desc,_title,_value,_vals,_type); alias=&(attributes[_attr]->intVal); }; virtual void init_attribute(const string &attr){}; @@ -389,7 +389,7 @@ namespace Rotor { create_signal_input("Selector","Selector input"); create_attribute("mode","Cycling mode {cut|mix}","Mode","cut",{"cut","mix"}); //create_attribute("time_mode","Time mode {abs|rel}","time mode","abs",{"abs","rel","stretch"}); - create_parameter("transition_length","number","transition length","Transition length",-1.0f,0.0f,0.0f); + create_parameter("transition_length","number","transition length","Transition length",-1.0f,0.0f,0.0f); title="Video cycler"; description="Cycles through video inputs according to selector signal"; duplicate_inputs=true; @@ -511,7 +511,7 @@ namespace Rotor { float clipframerate=(parameters["framerate"]->value==0.0f?player.get_framerate():parameters["framerate"]->value); float clipspeed=(clipframerate/frame.framerate)*parameters["speed"]->value; float wanted=0.0f; - if (inputs[0]->connection) { + if (inputs[0]->connection) { //using playhead //should speed affect it? //if you want absolute control then you just want absolute control? @@ -688,7 +688,7 @@ namespace Rotor { ~Video_output(){ }; void create_envelope(const vector &audio){ if (audio.size()){ - uint32_t i=0; + uint32_t i=1; while (iaudio[i-1]) i++; -- cgit v1.2.3