diff options
author | John Glover <j@johnglover.net> | 2013-06-21 13:00:52 +0200 |
---|---|---|
committer | John Glover <j@johnglover.net> | 2013-06-21 13:00:52 +0200 |
commit | 17da8d1a81e06c6e7a941b647354467fa47b4961 (patch) | |
tree | f201b31c7a73f7e281bca5cb4c71efb12621a071 /src | |
parent | 0c032a446907645bab4805d940e0125f666a5b69 (diff) | |
download | simpl-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.cpp | 3 |
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, |