diff options
| author | Comment <tim@gray.(none)> | 2013-08-19 10:43:52 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-08-19 10:43:52 +0100 |
| commit | 318ba67bf91c07ff1edd0f2547b49d80ef9e0f83 (patch) | |
| tree | 5de4f04308e37b5c2dc0a41aca70fe6fdb033249 /rotord/src | |
| parent | aa99d094fde27ba5dc79dfcee2509f5ae9a58017 (diff) | |
fix parameter attribute definition
Diffstat (limited to 'rotord/src')
| -rwxr-xr-x | rotord/src/rotor.cpp | 12 | ||||
| -rwxr-xr-x | rotord/src/rotor.h | 3 |
2 files changed, 12 insertions, 3 deletions
diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index d900943..e205492 100755 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -198,7 +198,13 @@ bool Video_output::render(const float duration, const float framerate,const stri libav::audioloader audioloader; - bool usingaudio=audioloader.setup(audio_filename); + bool usingaudio=false; + float *avframe=nullptr; + if (audioloader.setup(audio_filename)){ + bool usingaudio=true; + //avframe=new float[audioloader.channels*] + } + Logger& logger = Logger::get("Rotor"); logger.information("Video_output rendering "+output_filename+": "+ofToString(duration)+" seconds at "+ofToString(framerate)+" fps, audio frame size: "+ofToString(exporter.get_audio_framesize())); @@ -209,7 +215,6 @@ bool Video_output::render(const float duration, const float framerate,const stri gettimeofday(&start, NULL); - float vstep=1.0f/framerate; float v=0.0f; float vf=0.0f; @@ -218,6 +223,9 @@ bool Video_output::render(const float duration, const float framerate,const stri if (usingaudio) { while (!fless(af,vf)) { //insert audio frames until we are ahead of the video + //instead: get full amount of samples for frame + //send audio_framesize() of them through until buffer is used + //pass full buffer within frame_spec for av nodes exporter.encodeFrame(audioloader.get_samples(exporter.get_audio_framesize())); af+=exporter.get_audio_step(); } diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 199d960..f7d6861 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -176,7 +176,8 @@ namespace Rotor { } for (auto p: parameters){ if (find_setting(settings,p.first,"")!="") { - parameters[p.first]->init(find_setting(settings,p.first,0)); + parameters[p.first]->init(find_setting(settings,p.first,0.0f)); + cerr<<"setting parameter "<<p.first<<" to "<<find_setting(settings,p.first,0.0f)<<endl; } } } |
