From 58222a5ad27e41c02b9700e16b6e31fa9b5be09c Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 1 Oct 2013 02:28:24 +0100 Subject: sound envelope catch no data --- rotord/src/rotor.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'rotord/src') diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index be6ecee..b95a7b0 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -983,17 +983,20 @@ namespace Rotor { }; ~Video_output(){ }; void create_envelope(const vector &audio){ - int i=0; - while (iaudio[i-1]) i++; - start_peak=((float)i-1)/audio.size(); - i=audio.size(); - while (i>-1&&audio[i]audio[i+1]) i--; - end_peak=((float)i+1)/audio.size(); - cerr<<"Video_output sound envelope: silence - "<audio[i-1]) i++; + start_peak=((float)i-1)/audio.size(); + i=audio.size(); + while (i>-1&&audio[i]audio[i+1]) i--; + end_peak=((float)i+1)/audio.size(); + cerr<<"Video_output sound envelope: silence - "<get(frame); -- cgit v1.2.3