summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/simpl/peak_detection.cpp4
-rw-r--r--src/sndobj/SinAnal.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/simpl/peak_detection.cpp b/src/simpl/peak_detection.cpp
index 08d343b..3bb8447 100644
--- a/src/simpl/peak_detection.cpp
+++ b/src/simpl/peak_detection.cpp
@@ -363,15 +363,19 @@ SndObjPeakDetection::SndObjPeakDetection() {
SndObjPeakDetection::~SndObjPeakDetection() {
if(_input) {
delete _input;
+ _input = NULL;
}
if(_window) {
delete _window;
+ _window = NULL;
}
if(_ifgram) {
delete _ifgram;
+ _ifgram = NULL;
}
if(_analysis) {
delete _analysis;
+ _analysis = NULL;
}
}
diff --git a/src/sndobj/SinAnal.cpp b/src/sndobj/SinAnal.cpp
index 63dd7bc..d8e53cf 100644
--- a/src/sndobj/SinAnal.cpp
+++ b/src/sndobj/SinAnal.cpp
@@ -374,7 +374,7 @@ SinAnal::peakdetection(){
}
}
- for(i =0; i < n; i++){
+ for(i = 0; i < n; i++){
int rmax;
rmax = m_maxix[i];
@@ -409,8 +409,7 @@ SinAnal::FindPeaks(){
if(m_enable){
// find peaks
- int n = 0;
- n = peakdetection();
+ int n = peakdetection();
// output peaks
for(m_vecpos=0; m_vecpos < m_vecsize; m_vecpos += 3){