diff options
author | John Glover <j@johnglover.net> | 2013-06-14 15:58:44 +0200 |
---|---|---|
committer | John Glover <j@johnglover.net> | 2013-06-14 15:58:44 +0200 |
commit | 60ed1e8252e6e4f0cbc8c0a5c9aea124bdd2a01b (patch) | |
tree | c36f69f41b6857596a939c69a2a29fa7f8dbe197 /src | |
parent | 364d1a9352cf1adcf08fbd4f0e793f24540d7402 (diff) | |
download | simpl-60ed1e8252e6e4f0cbc8c0a5c9aea124bdd2a01b.tar.gz simpl-60ed1e8252e6e4f0cbc8c0a5c9aea124bdd2a01b.tar.bz2 simpl-60ed1e8252e6e4f0cbc8c0a5c9aea124bdd2a01b.zip |
Clean up
Diffstat (limited to 'src')
-rw-r--r-- | src/simpl/peak_detection.cpp | 4 | ||||
-rw-r--r-- | src/sndobj/SinAnal.cpp | 5 |
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){ |