From a694fb59023c161cc0985dab8996b6df878056a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0?= Date: Wed, 30 May 2018 12:36:28 +0300 Subject: [PATCH] added new array - peakFreqArray --- src/Graph.cpp | 3 ++- src/Graph.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Graph.cpp b/src/Graph.cpp index f6951e1..381e73f 100644 --- a/src/Graph.cpp +++ b/src/Graph.cpp @@ -3,8 +3,9 @@ Graph::Graph (int graphSize, int graphUpdateRate) { this->size = graphSize; this->updateRate = graphUpdateRate; // Раз в секунду + source = new int[size]; array = new int[size]; fft = new int[size/2]; - source = new int[size]; + peakFreqArray = new double[size/2]; counter = 0; } \ No newline at end of file diff --git a/src/Graph.h b/src/Graph.h index b0f3f2a..21e94d2 100644 --- a/src/Graph.h +++ b/src/Graph.h @@ -2,9 +2,10 @@ class Graph { public: int size; int updateRate; + int * source; int * array; int * fft; - int * source; + double * peakFreqArray; int counter; Graph (int graphSize, int graphUpdateRate);