From 6301fe548518955fe2ada97d84b73c632c17a65a Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 22 Feb 2020 06:20:54 +0100 Subject: [PATCH] Fixed segmentation fault --- ambed/csignalprocessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ambed/csignalprocessor.cpp b/ambed/csignalprocessor.cpp index 99ed30a..3f67687 100644 --- a/ambed/csignalprocessor.cpp +++ b/ambed/csignalprocessor.cpp @@ -69,7 +69,7 @@ CSignalProcessor::~CSignalProcessor() void CSignalProcessor::Process(uint8* voice, int length) { float sample; - int i; + int j; auto processorsSize = m_sampleProcessors.size(); for(int i = 0; i < length; i += 2) @@ -77,9 +77,9 @@ void CSignalProcessor::Process(uint8* voice, int length) //Get the sample sample = (float)(short)MAKEWORD(voice[i+1], voice[i]); - for(i = 0; i < processorsSize; i++) + for(j = 0; j < processorsSize; j++) { - sample = m_sampleProcessors[i]->ProcessSample(sample); + sample = m_sampleProcessors[j]->ProcessSample(sample); } //write processed sample back