summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Glover <j@johnglover.net>2012-09-11 17:50:40 +0200
committerJohn Glover <j@johnglover.net>2012-09-11 17:50:40 +0200
commita63456be33e31d785f4cc570a13bbd2757316073 (patch)
tree86499c19b6e7cef08c4eecb120158fa3ed7f2e32 /src
parent309ff462d17c5cdd8446da9d06f0e50a2b5da724 (diff)
downloadsimpl-a63456be33e31d785f4cc570a13bbd2757316073.tar.gz
simpl-a63456be33e31d785f4cc570a13bbd2757316073.tar.bz2
simpl-a63456be33e31d785f4cc570a13bbd2757316073.zip
[base] Bug fix: peaks and partial vectors should
be resized outside of data loss warning.
Diffstat (limited to 'src')
-rw-r--r--src/simpl/base.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/simpl/base.cpp b/src/simpl/base.cpp
index c2289ba..9683df3 100644
--- a/src/simpl/base.cpp
+++ b/src/simpl/base.cpp
@@ -131,8 +131,9 @@ void Frame::max_peaks(int new_max_peaks) {
// losing data here, allow but warn
printf("Warning: max peaks changed to less than current number "
"of peaks, some existing data was lost.\n");
- _peaks.resize(_max_peaks);
}
+
+ _peaks.resize(_max_peaks);
}
void Frame::add_peak(Peak* peak) {
@@ -170,8 +171,9 @@ void Frame::max_partials(int new_max_partials) {
// losing data here, allow but warn
printf("Warning: max partials changed to less than current number"
" of partials, some existing data was lost.\n");
- _partials.resize(_max_partials);
}
+
+ _partials.resize(_max_partials);
}
void Frame::add_partial(Peak* peak) {