From fe264b9da19838a658f78b1e3f46464a45f72058 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Thu, 31 Dec 2015 20:52:25 -0500 Subject: [PATCH] clear shifted peak data --- src/process/SpectrumVisualProcessor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/process/SpectrumVisualProcessor.cpp b/src/process/SpectrumVisualProcessor.cpp index af22b29..fe1992c 100644 --- a/src/process/SpectrumVisualProcessor.cpp +++ b/src/process/SpectrumVisualProcessor.cpp @@ -228,10 +228,12 @@ void SpectrumVisualProcessor::process() { memmove(&fft_result_ma[0], &fft_result_ma[numShift], (fftSizeInternal-numShift) * sizeof(double)); memmove(&fft_result_maa[0], &fft_result_maa[numShift], (fftSizeInternal-numShift) * sizeof(double)); memmove(&fft_result_peak[0], &fft_result_peak[numShift], (fftSizeInternal-numShift) * sizeof(double)); + memset(&fft_result_peak[fftSizeInternal-numShift], 0, numShift * sizeof(double)); } else { memmove(&fft_result_ma[numShift], &fft_result_ma[0], (fftSizeInternal-numShift) * sizeof(double)); memmove(&fft_result_maa[numShift], &fft_result_maa[0], (fftSizeInternal-numShift) * sizeof(double)); memmove(&fft_result_peak[numShift], &fft_result_peak[0], (fftSizeInternal-numShift) * sizeof(double)); + memset(&fft_result_peak[0], 0, numShift * sizeof(double)); } } }