From 17da8d1a81e06c6e7a941b647354467fa47b4961 Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 21 Jun 2013 13:00:52 +0200 Subject: [sndobj] Bug fix: clear partial tracking data from previous frames --- src/simpl/partial_tracking.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/simpl/partial_tracking.cpp b/src/simpl/partial_tracking.cpp index f93f1fd..f34d658 100644 --- a/src/simpl/partial_tracking.cpp +++ b/src/simpl/partial_tracking.cpp @@ -440,6 +440,9 @@ void SndObjPartialTracking::update_partials(Frame* frame) { _peak_frequency[i] = frame->peak(i)->frequency; _peak_phase[i] = frame->peak(i)->phase; } + for(int i = num_peaks; i < _max_partials; i++) { + _peak_amplitude[i] = _peak_frequency[i] = _peak_phase[i] = 0.0; + } _analysis->SetPeaks(_max_partials, _peak_amplitude, _max_partials, _peak_frequency, -- cgit v1.2.3