From 0bfff4a53b9fbb49cdad68e172ff01b8e8c2eb56 Mon Sep 17 00:00:00 2001
From: Marek Blok <Marek.Blok@pg.edu.pl>
Date: Thu, 30 Mar 2023 13:01:11 +0200
Subject: [PATCH] DSP::u::Vacuum fix for AreInputsComplex = true

---
 CHANGELOG             | 2 ++
 src/cpp/DSP_IO.cpp    | 8 ++++++--
 src/include/DSP_lib.h | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index af2e377..187ac12 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,8 @@ TODO::
 LAST DONE:
 
 CHANGES:
+- ver. 0.20.019 - <b>2022.03.30</b> Fixed: 
+  - DSP::u::Vacuum fix for AreInputsComplex = true: not all input lines were grouped in input "in"
 - ver. 0.20.018 - <b>2022.03.29</b> Changed: 
   - Full support for Visual Studio 2019 (DSPE_lib.sln) for 32 and 64-bit architectures
 - ver. 0.20.017 - <b>2022.03.28</b> Changed: 
diff --git a/src/cpp/DSP_IO.cpp b/src/cpp/DSP_IO.cpp
index 01e3a0e..e0ff649 100644
--- a/src/cpp/DSP_IO.cpp
+++ b/src/cpp/DSP_IO.cpp
@@ -273,10 +273,10 @@ void DSP::u::Vacuum::Init(bool AreInputsComplex, unsigned int NoOfInputs_in)
   vector <unsigned int> all_indexes;
   for (ind=0; ind<NoOfInputs_in; ind++)
   {
-    all_indexes.push_back(ind);
-
     if (AreInputsComplex == false)
     {
+      all_indexes.push_back(ind);
+
       temp = "in" + to_string(ind+1);
       DefineInput(temp, ind);
       temp = "in" + to_string(ind+1) + ".re";
@@ -284,8 +284,12 @@ void DSP::u::Vacuum::Init(bool AreInputsComplex, unsigned int NoOfInputs_in)
     }
     else
     {
+      all_indexes.push_back(2*ind);
+      all_indexes.push_back(2*ind+1);
+  
       temp = "in" + to_string(ind+1);
       DefineInput(temp, 2*ind, 2*ind+1);
+  
       temp = "in" + to_string(ind+1) + ".re";
       DefineInput(temp, 2*ind);
       temp = "in" + to_string(ind+1) + ".im";
diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h
index 8e4b464..b7fd6b7 100644
--- a/src/include/DSP_lib.h
+++ b/src/include/DSP_lib.h
@@ -11,7 +11,7 @@
 
 #define DSP_VER_MAJOR 0
 #define DSP_VER_MINOR 20
-#define DSP_VER_BUILD 18 // !!! without zeroes before, else this will be treated as octal number
+#define DSP_VER_BUILD 19 // !!! without zeroes before, else this will be treated as octal number
 #define DSP_VER_YEAR  2023
 #define DSP_VER       DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD
 
-- 
GitLab