From 1ba9ed9c71f11b638fb829ed9ff5946df09bab35 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 20 Aug 2013 15:01:53 +0100 Subject: frame mode for video loader + audio output bugfix --- rotord/src/rotor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rotord/src') diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index 407004e..90f60a9 100755 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -217,7 +217,7 @@ bool Video_output::render(const float duration, const float framerate,const stri int samples_in_frame=(audioloader.codecContext->channels*audioloader.codecContext->sample_rate)/framerate; string whether=usingaudio?"Loading":"Cannot load"; logger.information(whether+" audio file: "+audio_filename+", each frame contains "+ofToString(samples_in_frame)+" samples at "+ofToString(audioloader.codecContext->sample_rate)+" hz"); - uint16_t *audioframe=new uint16_t[samples_in_frame]; + uint16_t *audioframe; } float vstep=1.0f/framerate; @@ -231,6 +231,7 @@ bool Video_output::render(const float duration, const float framerate,const stri //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(); } @@ -266,7 +267,7 @@ bool Video_output::render(const float duration, const float framerate,const stri if (usingaudio) { audioloader.close(); - delete[] audioframe; + //delete[] audioframe; } -- cgit v1.2.3