summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Glover <j@johnglover.net>2013-06-21 13:00:52 +0200
committerJohn Glover <j@johnglover.net>2013-06-21 13:00:52 +0200
commit17da8d1a81e06c6e7a941b647354467fa47b4961 (patch)
treef201b31c7a73f7e281bca5cb4c71efb12621a071 /src
parent0c032a446907645bab4805d940e0125f666a5b69 (diff)
downloadsimpl-17da8d1a81e06c6e7a941b647354467fa47b4961.tar.gz
simpl-17da8d1a81e06c6e7a941b647354467fa47b4961.tar.bz2
simpl-17da8d1a81e06c6e7a941b647354467fa47b4961.zip
[sndobj] Bug fix: clear partial tracking data from previous frames
Diffstat (limited to 'src')
-rw-r--r--src/simpl/partial_tracking.cpp3
1 files changed, 3 insertions, 0 deletions
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,