Cleaning the configurations and parameters architecture
authorFrancoisGrondin <francois.grondin2@usherbrooke.ca>
Tue, 3 Oct 2017 16:58:53 +0000 (12:58 -0400)
committerFrancoisGrondin <francois.grondin2@usherbrooke.ca>
Tue, 3 Oct 2017 16:58:53 +0000 (12:58 -0400)
73 files changed:
CMakeLists.txt
README.md
config/respeaker.cfg
config/respeaker.ios [deleted file]
config/xmos.cfg
config/xmos.ios [deleted file]
demo/configs.c
demo/configs.h
demo/debug.c [deleted file]
demo/main.c
demo/objects.c
demo/objects.h
demo/parameters.c
demo/parameters.h
demo/profiler.c
demo/profiler.h
demo/threads.c
include/odas/odas.h
src/aconnector/acon_envs.c [deleted file]
src/aconnector/acon_envs.h [deleted file]
src/amessage/amsg_envs.c [deleted file]
src/amessage/amsg_envs.h [deleted file]
src/amodule/amod_sspf.c [deleted file]
src/amodule/amod_sspf.h [deleted file]
src/amodule/amod_sss.c
src/amodule/amod_sss.h
src/asink/asnk_xcorrs.c [deleted file]
src/asink/asnk_xcorrs.h [deleted file]
src/asource/asrc_spectra.c [deleted file]
src/asource/asrc_spectra.h [deleted file]
src/connector/con_envs.c [deleted file]
src/connector/con_envs.h [deleted file]
src/general/format.c
src/general/format.h
src/general/interface.c
src/general/interface.h
src/message/msg_envs.c [deleted file]
src/message/msg_envs.h [deleted file]
src/message/msg_hops.c
src/message/msg_xcorrs.c [deleted file]
src/message/msg_xcorrs.h [deleted file]
src/module/mod_ssl.c
src/module/mod_sspf.c [deleted file]
src/module/mod_sspf.h [deleted file]
src/module/mod_sss.c
src/module/mod_sss.h
src/signal/env.c [deleted file]
src/signal/env.h [deleted file]
src/sink/snk_hops.c
src/sink/snk_hops.h
src/sink/snk_pots.c
src/sink/snk_pots.h
src/sink/snk_spectra.c
src/sink/snk_tracks.c
src/sink/snk_tracks.h
src/sink/snk_xcorrs.c [deleted file]
src/sink/snk_xcorrs.h [deleted file]
src/source/src_hops.c
src/source/src_hops.h
src/source/src_pots.c [deleted file]
src/source/src_pots.h [deleted file]
src/source/src_spectra.c [deleted file]
src/source/src_spectra.h [deleted file]
src/source/src_tracks.c [deleted file]
src/source/src_tracks.h [deleted file]
src/source/src_xcorrs.c [deleted file]
src/source/src_xcorrs.h [deleted file]
src/system/freq2env.c [deleted file]
src/system/freq2env.h [deleted file]
src/system/freq2freq.c
src/system/freq2freq.h
src/system/steer2env.c [deleted file]
src/system/steer2env.h [deleted file]

index 1d1233dabf8736aaee2590fc00462f58786494c8..82f6135e36ad6e5ba29e0542f9041e813a0226cd 100644 (file)
@@ -42,7 +42,6 @@ set(SRC
     src/signal/beampattern.c
     src/signal/coherence.c
     src/signal/delta.c
-    src/signal/env.c
     src/signal/frame.c
     src/signal/freq.c
     src/signal/gain.c
@@ -72,7 +71,6 @@ set(SRC
     src/system/hop2hop.c
     src/system/hop2frame.c
     src/system/frame2freq.c
-    src/system/freq2env.c
     src/system/freq2freq.c
     src/system/freq2frame.c
     src/system/freq2xcorr.c
@@ -83,7 +81,6 @@ set(SRC
     src/system/mixture2mixture.c
     src/system/particle2coherence.c
     src/system/particle2particle.c
-    src/system/steer2env.c
     src/system/steer2freq.c
     src/system/track2gain.c
     src/system/track2steer.c
@@ -97,12 +94,10 @@ set(SRC
     src/utils/pcm.c
     src/utils/random.c
 
-    src/aconnector/acon_envs.c
     src/aconnector/acon_hops.c
     src/aconnector/acon_pots.c
     src/aconnector/acon_spectra.c
     src/aconnector/acon_tracks.c
-    src/amessage/amsg_envs.c
     src/amessage/amsg_hops.c
     src/amessage/amsg_pots.c
     src/amessage/amsg_spectra.c
@@ -112,7 +107,6 @@ set(SRC
     src/amodule/amod_mapping.c
     src/amodule/amod_resample.c
     src/amodule/amod_ssl.c
-    src/amodule/amod_sspf.c
     src/amodule/amod_sss.c
     src/amodule/amod_sst.c
     src/amodule/amod_stft.c
@@ -121,25 +115,20 @@ set(SRC
     src/asink/asnk_spectra.c
     src/asink/asnk_tracks.c
     src/asource/asrc_hops.c  
-    src/asource/asrc_spectra.c
     
-    src/connector/con_envs.c
     src/connector/con_hops.c
     src/connector/con_pots.c
     src/connector/con_spectra.c
     src/connector/con_tracks.c
-    src/message/msg_envs.c
     src/message/msg_hops.c
     src/message/msg_pots.c
     src/message/msg_spectra.c
     src/message/msg_tracks.c
-    src/message/msg_xcorrs.c
     src/module/mod_gain.c
     src/module/mod_istft.c
     src/module/mod_mapping.c
     src/module/mod_resample.c
     src/module/mod_ssl.c
-    src/module/mod_sspf.c
     src/module/mod_sss.c
     src/module/mod_sst.c
     src/module/mod_stft.c
@@ -147,11 +136,7 @@ set(SRC
     src/sink/snk_pots.c
     src/sink/snk_spectra.c
     src/sink/snk_tracks.c
-    src/sink/snk_xcorrs.c
     src/source/src_hops.c
-    src/source/src_pots.c
-    src/source/src_spectra.c
-    src/source/src_tracks.c
 
 )
 
@@ -179,17 +164,6 @@ target_link_libraries(odascore
     odas
 )
 
-#add_executable(server
-#    demo/server.c
-#)
-
-#add_executable(debug
-#    demo/debug.c
-#)
-#target_link_libraries(debug
-#    odas
-#)
-
 install(TARGETS odas DESTINATION lib)
 
 
index 82fdb07324719f2ce77821546cdea2c65421beb9..0d2f9f37fbcf13fd21767c7cc42a1a5ad3d4f60a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -76,17 +76,20 @@ card 3: Array [ReSpeaker Microphone Array], device 0: USB Audio [USB Audio]
   Subdevice #0: subdevice #0
 ```
 
-In this case, the soundcard ID is 3, and the device ID is 0. Open the file config/respeaker.ios, and set the soundcard ID and device ID:
+In this case, the soundcard ID is 3, and the device ID is 0. Open the file config/respeaker.cfg, and set in the section "raw" the soundcard ID and device ID:
 
 ```
-#ReSpeaker Device, 16bits.
-raw: { type = "soundcard"; card = 3; device = 0; format = "bin16"; }
+interface: {
+    type = "soundcard";
+    card = 3;
+    device = 0;
+}
 ```
 
 To run ODAS with ReSpeaker, and type in the following command:
 
 ```
-bin/odascore -c config/respeaker.cfg -i config/respeaker.ios
+bin/odascore -c config/respeaker.cfg
 ```
 
 You should get the following output:
@@ -128,17 +131,20 @@ card 3: UAC20 [XMOS Microphone Array UAC2.0], device 0: USB Audio [USB Audio]
   Subdevice #0: subdevice #0
 ```
 
-In this case, the soundcard ID is 3, and the device ID is 0. Open the file config/xmos.ios, and set the soundcard ID and device ID:
+In this case, the soundcard ID is 3, and the device ID is 0. Open the file config/xmos.cfg, and set in the section "raw" the soundcard ID and device ID:
 
 ```
-#XMOS Device, 32bits.
-raw: { type = "soundcard"; card = 3; device = 0; format = "bin32"; }
+interface: {
+    type = "soundcard";
+    card = 3;
+    device = 0;
+}
 ```
 
 To run ODAS with XMOS, and type in the following command:
 
 ```
-bin/odascore -c config/xmos.cfg -i config/xmos.ios
+bin/odascore -c config/xmos.cfg
 ```
 
 You should get the following output:
index adfbb99cb9e66c418e2cbd559d3d3a8288c62a19..e133fc4d9ff7a132298d902ada8cf58493813386 100644 (file)
@@ -1,8 +1,6 @@
 # Configuration file for ReSpeaker circular sound card
 
-version = "2.0";
-author = "François Grondin";
-date = "21/09/2017"
+version = "2.1";
 
 # Raw
 
@@ -11,7 +9,15 @@ raw:
 
     fS = 16000;
     hopSize = 128;
-    nChannels = 8;
+    nBits = 16;
+    nChannels = 8; 
+
+    # Input with raw signal from microphones
+    interface: {
+        type = "soundcard";
+        card = 3;
+        device = 0;
+    }
 
 }
 
@@ -19,7 +25,7 @@ raw:
 
 mapping:
 {
-    
+
     map: (1, 2, 3, 4, 5, 6, 7);
 
 }
@@ -118,6 +124,9 @@ general:
 
     };    
 
+    nThetas = 181;
+    gainMin = 0.25;
+
 };
 
 # Sound Source Localization
@@ -129,9 +138,7 @@ ssl:
     nMatches = 10;
     probMin = 0.5;
     nRefinedLevels = 1;
-    gainMin = 0.25;
-    nThetas = 181;
-    interpRate = 4;
+    interpRate = 1;
 
     # Number of scans: level is the resolution of the sphere
     # and delta is the size of the maximum sliding window
@@ -141,6 +148,17 @@ ssl:
         { level = 4; delta = -1; }
     );
 
+    # Output to export potential sources
+    potential: {
+
+        format = "json";
+
+        interface: {
+            type = "blackhole";
+        };
+
+    };
+
 };
 
 # Sound Source Tracking
@@ -155,7 +173,7 @@ sst:
     # Parameters used by both the Kalman and particle filter
 
     active = (
-        { weight = 1.0; mu = 0.5; sigma2 = 0.0025 }
+        { weight = 1.0; mu = 0.3; sigma2 = 0.0025 }
     );
 
     inactive = (
@@ -180,7 +198,7 @@ sst:
 
         sigmaQ = 0.001;
         
-    }
+    };
    
     # Parameters used by the particle filter only
 
@@ -198,6 +216,51 @@ sst:
         ac_ratio = 0.2;
         Nmin = 0.7;
 
-    }
+    };
+
+    # Output to export tracked sources
+    tracked: {
+
+        format = "json";
+
+        interface: {
+            type = "blackhole";
+        };
+
+    };
+
+}
+
+sss:
+{
+    
+    # Mode is either "ds", "gss" or "mvdr"
+
+    mode = "ds";
+
+    ds: {
+
+    };
+
+    gss: {
+
+    };
+
+    mvdr: {
+
+    };
+
+    separated: {
+
+        fS = 44100;
+        hopSize = 512;
+        nBits = 16;        
+
+        interface: {
+            type = "file";
+            path = "separated.raw";
+        }        
+
+    };
 
 }
diff --git a/config/respeaker.ios b/config/respeaker.ios
deleted file mode 100644 (file)
index 2227497..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Input
-
-input:
-{
-   
-    #ReSpeaker Device, 16bits.
-    raw: { type = "soundcard"; card = 3; device = 0; format = "bin16"; }
-
-};
-
-# Output:
-
-output:
-{
-
-    # No raw output for now...
-    raw: ();
-
-    # For debug purpose, leave empty.
-    mapping: ();
-    resample: ();
-    stft: ();
-
-    # Sound Source Localization Results
-    ssl: ();
-
-    # Sound Source Tracking Results
-    sst:
-    (
-        { type = "terminal"; format = "json"; }
-    );
-
-    # For debug purpose, leave empty.
-    sss: ();
-    sspf: ();
-    istft: ();
-
-    # Separated signal, for now leave empty.
-    playback: ();
-
-}
index c7067be0b6c526b4aececec89065fd374f37f148..a218908c0a1d04cf318fc5d73657dcad279500f8 100644 (file)
@@ -1,6 +1,6 @@
 # Configuration file for XMOS circular sound card
 
-version = "2.0";
+version = "2.1";
 
 # Raw
 
@@ -9,7 +9,14 @@ raw:
 
     fS = 44100;
     hopSize = 512;
-    nChannels = 8;
+    nBits = 32;
+    nChannels = 8; 
+
+    # Input with raw signal from microphones
+    interface: {
+        type = "file";
+        path = "input.raw";
+    }
 
 }
 
@@ -17,7 +24,7 @@ raw:
 
 mapping:
 {
-    
+
     map: (1, 2, 3, 4, 5, 6, 7);
 
 }
@@ -116,6 +123,9 @@ general:
 
     };    
 
+    nThetas = 181;
+    gainMin = 0.25;
+
 };
 
 # Sound Source Localization
@@ -127,8 +137,6 @@ ssl:
     nMatches = 10;
     probMin = 0.5;
     nRefinedLevels = 1;
-    gainMin = 0.25;
-    nThetas = 181;
     interpRate = 1;
 
     # Number of scans: level is the resolution of the sphere
@@ -139,6 +147,17 @@ ssl:
         { level = 4; delta = -1; }
     );
 
+    # Output to export potential sources
+    potential: {
+
+        format = "json";
+
+        interface: {
+            type = "blackhole";
+        };
+
+    };
+
 };
 
 # Sound Source Tracking
@@ -178,7 +197,7 @@ sst:
 
         sigmaQ = 0.001;
         
-    }
+    };
    
     # Parameters used by the particle filter only
 
@@ -196,33 +215,51 @@ sst:
         ac_ratio = 0.2;
         Nmin = 0.7;
 
-    }
+    };
 
-}
+    # Output to export tracked sources
+    tracked: {
 
-# Sound source separation
+        format = "json";
 
-sss: {
-   
-    nThetas = 181;
-    gainMin = 0.01;
+        interface: {
+            type = "blackhole";
+        };
 
-}
+    };
 
-# Sound source post-filtering
+}
 
-sspf: {
+sss:
+{
     
-    alpha = 10.0;
-    beta = 0.95;
-    Ginterf = 0.01;
+    # Mode is either "ds", "gss" or "mvdr"
 
-}
+    mode = "ds";
 
-# Playback of separated streams
+    ds: {
 
-playback: {
-    
-    volume = 10.0;
+    };
+
+    gss: {
+
+    };
 
-}
\ No newline at end of file
+    mvdr: {
+
+    };
+
+    separated: {
+
+        fS = 44100;
+        hopSize = 512;
+        nBits = 16;        
+
+        interface: {
+            type = "file";
+            path = "separated.raw";
+        }        
+
+    };
+
+}
diff --git a/config/xmos.ios b/config/xmos.ios
deleted file mode 100644 (file)
index 10edbe0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Input
-
-input:
-{
-   
-    #XMOS Device, 32bits.
-    raw: { type = "soundcard"; card = 3; device = 0; format = "bin32"; }
-
-};
-
-# Output:
-
-output:
-{
-
-    # No raw output for now...
-    raw: ();
-
-    # For debug purpose, leave empty.
-    mapping: ();
-    resample: ();
-    stft: ();
-
-    # Sound Source Localization Results
-    ssl: ();
-
-    # Sound Source Tracking Results
-    sst:
-    (
-        { type = "terminal"; format = "json"; }
-    );
-
-    # For debug purpose, leave empty.
-    sss: ();
-    sspf: ();
-    istft: ();
-
-    # Separated signal, for now leave empty.
-    playback: ();
-
-}
-
index dfe67caa733e959396724ec22ddbb4cc1783df1d..7b6ec7cd544bd2baf79ae009bb33b4cfca5eb2f7 100644 (file)
@@ -1,7 +1,7 @@
 
     #include "configs.h"
 
-    configs * configs_construct(const char * file_config, const char * file_ios) {
+    configs * configs_construct(const char * file_config) {
 
         configs * cfgs;
         unsigned int iSink;
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                cfgs->src_hops_raw_config = parameters_src_hops_raw_config(file_config, file_ios);
+                cfgs->src_hops_mics_config = parameters_src_hops_mics_config(file_config);
 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                cfgs->msg_hops_raw_config = parameters_msg_hops_raw_config(file_config, file_ios);
-            
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                 
-            
-                cfgs->snk_hops_raw_config_count = parameters_snk_hops_raw_count(file_config, file_ios);
-                cfgs->snk_hops_raw_configs = (snk_hops_cfg **) malloc(sizeof(snk_hops_cfg *) * cfgs->snk_hops_raw_config_count);
-
-                for (iSink = 0; iSink < cfgs->snk_hops_raw_config_count; iSink++) {
-
-                    cfgs->snk_hops_raw_configs[iSink] = parameters_snk_hops_raw_config(file_config, file_ios, iSink);
-
-                }
+                cfgs->msg_hops_mics_raw_config = parameters_msg_hops_mics_raw_config(file_config);
 
         // +----------------------------------------------------------+
         // | Mapping                                                  |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                cfgs->mod_mapping_config = parameters_mod_mapping_config(file_config, file_ios);
+                cfgs->mod_mapping_mics_config = parameters_mod_mapping_mics_config(file_config);
 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                cfgs->msg_hops_mapping_config = parameters_msg_hops_mapping_config(file_config, file_ios);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-
-                cfgs->snk_hops_mapping_config_count = parameters_snk_hops_mapping_count(file_config, file_ios);
-                cfgs->snk_hops_mapping_configs = (snk_hops_cfg **) malloc(sizeof(snk_hops_cfg *) * cfgs->snk_hops_mapping_config_count);
-
-                for (iSink = 0; iSink < cfgs->snk_hops_mapping_config_count; iSink++) {
+                cfgs->msg_hops_mics_map_config = parameters_msg_hops_mics_map_config(file_config);
 
-                    cfgs->snk_hops_mapping_configs[iSink] = parameters_snk_hops_mapping_config(file_config, file_ios, iSink);
-
-                }
 
         // +----------------------------------------------------------+
         // | Resample                                                 |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                cfgs->mod_resample_config = parameters_mod_resample_config(file_config, file_ios);
+                cfgs->mod_resample_mics_config = parameters_mod_resample_mics_config(file_config);
 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                cfgs->msg_hops_resample_config = parameters_msg_hops_resample_config(file_config, file_ios);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+  
-
-                cfgs->snk_hops_resample_config_count = parameters_snk_hops_resample_count(file_config, file_ios);
-                cfgs->snk_hops_resample_configs = (snk_hops_cfg **) malloc(sizeof(snk_hops_cfg *) * cfgs->snk_hops_resample_config_count);
-
-                for (iSink = 0; iSink < cfgs->snk_hops_resample_config_count; iSink++) {
-
-                    cfgs->snk_hops_resample_configs[iSink] = parameters_snk_hops_resample_config(file_config, file_ios, iSink);
-
-                }
+                cfgs->msg_hops_mics_rs_config = parameters_msg_hops_mics_rs_config(file_config);
 
         // +----------------------------------------------------------+
         // | STFT                                                     |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                cfgs->mod_stft_config = parameters_mod_stft_config(file_config, file_ios);
+                cfgs->mod_stft_mics_config = parameters_mod_stft_mics_config(file_config);
 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                cfgs->msg_spectra_stft_config = parameters_msg_spectra_stft_config(file_config, file_ios);
+                cfgs->msg_spectra_mics_config = parameters_msg_spectra_mics_config(file_config);
 
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+  
-
-                cfgs->snk_spectra_stft_config_count = parameters_snk_spectra_stft_count(file_config, file_ios);
-                cfgs->snk_spectra_stft_configs = (snk_spectra_cfg **) malloc(sizeof(snk_spectra_cfg *) * cfgs->snk_spectra_stft_config_count);
-
-                for (iSink = 0; iSink < cfgs->snk_spectra_stft_config_count; iSink++) {
-
-                    cfgs->snk_spectra_stft_configs[iSink] = parameters_snk_spectra_stft_config(file_config, file_ios, iSink);
-
-                }
 
         // +----------------------------------------------------------+
         // | SSL                                                      |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                cfgs->mod_ssl_config = parameters_mod_ssl_config(file_config, file_ios);
+                cfgs->mod_ssl_config = parameters_mod_ssl_config(file_config);
 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                cfgs->msg_pots_ssl_config = parameters_msg_pots_ssl_config(file_config, file_ios);
+                cfgs->msg_pots_ssl_config = parameters_msg_pots_ssl_config(file_config);
 
             // +------------------------------------------------------+
             // | Sinks                                                |
             // +------------------------------------------------------+  
 
-                cfgs->snk_pots_ssl_config_count = parameters_snk_pots_ssl_count(file_config, file_ios);
-                cfgs->snk_pots_ssl_configs = (snk_pots_cfg **) malloc(sizeof(snk_pots_cfg *) * cfgs->snk_pots_ssl_config_count);
+                cfgs->snk_pots_ssl_config = parameters_snk_pots_ssl_config(file_config);
 
-                for (iSink = 0; iSink < cfgs->snk_pots_ssl_config_count; iSink++) {
-
-                    cfgs->snk_pots_ssl_configs[iSink] = parameters_snk_pots_ssl_config(file_config, file_ios, iSink);
-
-                }
 
         // +----------------------------------------------------------+
         // | SST                                                      |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                cfgs->mod_sst_config = parameters_mod_sst_config(file_config, file_ios);
+                cfgs->mod_sst_config = parameters_mod_sst_config(file_config);
 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                cfgs->msg_tracks_sst_config = parameters_msg_tracks_sst_config(file_config, file_ios);
+                cfgs->msg_tracks_sst_config = parameters_msg_tracks_sst_config(file_config);
 
             // +------------------------------------------------------+
             // | Sinks                                                |
             // +------------------------------------------------------+  
 
-                cfgs->snk_tracks_sst_config_count = parameters_snk_tracks_sst_count(file_config, file_ios);
-                cfgs->snk_tracks_sst_configs = (snk_tracks_cfg **) malloc(sizeof(snk_tracks_cfg *) * cfgs->snk_tracks_sst_config_count);
-
-                for (iSink = 0; iSink < cfgs->snk_tracks_sst_config_count; iSink++) {
-
-                    cfgs->snk_tracks_sst_configs[iSink] = parameters_snk_tracks_sst_config(file_config, file_ios, iSink);
+                cfgs->snk_tracks_sst_config = parameters_snk_tracks_sst_config(file_config);
 
-                }
 /*
         // +----------------------------------------------------------+
         // | SSS                                                      |
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                src_hops_cfg_destroy(cfgs->src_hops_raw_config);
+                src_hops_cfg_destroy(cfgs->src_hops_mics_config);
                 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                msg_hops_cfg_destroy(cfgs->msg_hops_raw_config);
+                msg_hops_cfg_destroy(cfgs->msg_hops_mics_raw_config);
                             
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                 
-            
-                for (iSink = 0; iSink < cfgs->snk_hops_raw_config_count; iSink++) {
-
-                    snk_hops_cfg_destroy(cfgs->snk_hops_raw_configs[iSink]);
-
-                }
-
-                free((void *) cfgs->snk_hops_raw_configs);
-
         // +----------------------------------------------------------+
         // | Mapping                                                  |
         // +----------------------------------------------------------+  
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                mod_mapping_cfg_destroy(cfgs->mod_mapping_config);
+                mod_mapping_cfg_destroy(cfgs->mod_mapping_mics_config);
                 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                msg_hops_cfg_destroy(cfgs->msg_hops_mapping_config);
+                msg_hops_cfg_destroy(cfgs->msg_hops_mics_map_config);
                             
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                 
-            
-                for (iSink = 0; iSink < cfgs->snk_hops_mapping_config_count; iSink++) {
-
-                    snk_hops_cfg_destroy(cfgs->snk_hops_mapping_configs[iSink]);
-
-                }
-
-                free((void *) cfgs->snk_hops_mapping_configs);
-
         // +----------------------------------------------------------+
         // | Mapping                                                  |
         // +----------------------------------------------------------+  
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                mod_resample_cfg_destroy(cfgs->mod_resample_config);
+                mod_resample_cfg_destroy(cfgs->mod_resample_mics_config);
                 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                msg_hops_cfg_destroy(cfgs->msg_hops_resample_config);
-                            
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                 
-            
-                for (iSink = 0; iSink < cfgs->snk_hops_resample_config_count; iSink++) {
-
-                    snk_hops_cfg_destroy(cfgs->snk_hops_resample_configs[iSink]);
-
-                }
-
-                free((void *) cfgs->snk_hops_resample_configs);
-
+                msg_hops_cfg_destroy(cfgs->msg_hops_mics_rs_config);
+  
         // +----------------------------------------------------------+
         // | STFT                                                     |
         // +----------------------------------------------------------+  
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                mod_stft_cfg_destroy(cfgs->mod_stft_config);
+                mod_stft_cfg_destroy(cfgs->mod_stft_mics_config);
                 
             // +------------------------------------------------------+
             // | Message                                              |
             // +------------------------------------------------------+  
 
-                msg_spectra_cfg_destroy(cfgs->msg_spectra_stft_config);
+                msg_spectra_cfg_destroy(cfgs->msg_spectra_mics_config);
                             
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                 
-            
-                for (iSink = 0; iSink < cfgs->snk_spectra_stft_config_count; iSink++) {
-
-                    snk_spectra_cfg_destroy(cfgs->snk_spectra_stft_configs[iSink]);
-
-                }
-
-                free((void *) cfgs->snk_spectra_stft_configs);
-
         // +----------------------------------------------------------+
         // | SSL                                                      |
         // +----------------------------------------------------------+  
                 msg_pots_cfg_destroy(cfgs->msg_pots_ssl_config);
                             
             // +------------------------------------------------------+
-            // | Sinks                                                |
+            // | Sink                                                 |
             // +------------------------------------------------------+                 
             
-                for (iSink = 0; iSink < cfgs->snk_pots_ssl_config_count; iSink++) {
-
-                    snk_pots_cfg_destroy(cfgs->snk_pots_ssl_configs[iSink]);
-
-                }
-
-                free((void *) cfgs->snk_pots_ssl_configs);
+                snk_pots_cfg_destroy(cfgs->snk_pots_ssl_config);
 
         // +----------------------------------------------------------+
         // | SST                                                      |
                 msg_tracks_cfg_destroy(cfgs->msg_tracks_sst_config);
                             
             // +------------------------------------------------------+
-            // | Sinks                                                |
+            // | Sink                                                 |
             // +------------------------------------------------------+                 
             
-                for (iSink = 0; iSink < cfgs->snk_tracks_sst_config_count; iSink++) {
-
-                    snk_tracks_cfg_destroy(cfgs->snk_tracks_sst_configs[iSink]);
-
-                }
-
-                free((void *) cfgs->snk_tracks_sst_configs);
+                snk_tracks_cfg_destroy(cfgs->snk_tracks_sst_config);
 /*
         // +----------------------------------------------------------+
         // | SSS                                                      |
index fa7113eeb9b7624b56687f0cb8e2b8612369734f..b925a6cb65b4bf828fff39efbf29dc4f1ef667d3 100644 (file)
@@ -8,62 +8,29 @@
 
     typedef struct configs {
                 
-        src_hops_cfg * src_hops_raw_config;
-        msg_hops_cfg * msg_hops_raw_config;
-        unsigned int snk_hops_raw_config_count;                
-        snk_hops_cfg ** snk_hops_raw_configs;       
+        src_hops_cfg * src_hops_mics_config;
+        msg_hops_cfg * msg_hops_mics_raw_config;
 
-        mod_mapping_cfg * mod_mapping_config;
-        msg_hops_cfg * msg_hops_mapping_config;
-        unsigned int snk_hops_mapping_config_count;
-        snk_hops_cfg ** snk_hops_mapping_configs;
+        mod_mapping_cfg * mod_mapping_mics_config;
+        msg_hops_cfg * msg_hops_mics_map_config;
 
-        mod_resample_cfg * mod_resample_config;
-        msg_hops_cfg * msg_hops_resample_config;
-        unsigned int snk_hops_resample_config_count;
-        snk_hops_cfg ** snk_hops_resample_configs;
+        mod_resample_cfg * mod_resample_mics_config;
+        msg_hops_cfg * msg_hops_mics_rs_config;
 
-        mod_stft_cfg * mod_stft_config;
-        msg_spectra_cfg * msg_spectra_stft_config;
-        unsigned int snk_spectra_stft_config_count;
-        snk_spectra_cfg ** snk_spectra_stft_configs;
+        mod_stft_cfg * mod_stft_mics_config;
+        msg_spectra_cfg * msg_spectra_mics_config;
 
         mod_ssl_cfg * mod_ssl_config;
         msg_pots_cfg * msg_pots_ssl_config;
-        unsigned int snk_pots_ssl_config_count;
-        snk_pots_cfg ** snk_pots_ssl_configs;
+        snk_pots_cfg * snk_pots_ssl_config;
 
         mod_sst_cfg * mod_sst_config;
         msg_tracks_cfg * msg_tracks_sst_config;
-        unsigned int snk_tracks_sst_config_count;
-        snk_tracks_cfg ** snk_tracks_sst_configs;
-
-        /*
-        mod_sss_cfg * mod_sss_config;
-        msg_spectra_cfg * msg_spectra_sss_config;
-        msg_envs_cfg * msg_envs_sss_config;
-        unsigned int snk_spectra_sss_config_count;
-        snk_spectra_cfg ** snk_spectra_sss_configs;
-
-        mod_sspf_cfg * mod_sspf_config;
-        msg_spectra_cfg * msg_spectra_sspf_config;
-        unsigned int snk_spectra_sspf_config_count;
-        snk_spectra_cfg ** snk_spectra_sspf_configs;
-
-        mod_istft_cfg * mod_istft_config;
-        msg_hops_cfg * msg_hops_istft_config;
-        unsigned int snk_hops_istft_config_count;
-        snk_hops_cfg ** snk_hops_istft_configs;
-
-        mod_gain_cfg * mod_gain_config;
-        msg_hops_cfg * msg_hops_gain_config;
-        unsigned int snk_hops_gain_config_count;
-        snk_hops_cfg ** snk_hops_gain_configs;
-        */
+        snk_tracks_cfg * snk_tracks_sst_config;
 
     } configs;
 
-    configs * configs_construct(const char * file_config, const char * file_ios);
+    configs * configs_construct(const char * file_config);
 
     void configs_destroy(configs * cfgs);
 
diff --git a/demo/debug.c b/demo/debug.c
deleted file mode 100644 (file)
index fb4b120..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-    #include <stdlib.h>
-    #include <stdio.h>
-    #include <string.h>
-    
-    #include <odas/odas.h>
-
-    int main(int argc, char* argv[])
-    {
-
-        
-        return 0;
-
-    }
\ No newline at end of file
index a29b82b0f291012fdbcf5674e66d346acb4d12e2..f53517c70e16903171372b5b1eb33997c2527613 100644 (file)
@@ -30,7 +30,6 @@
 
             int c;
             char * file_config;
-            char * file_ios;
 
         // +------------------------------------------------------+
         // | Objects                                              |
         // +------------------------------------------------------+  
 
             file_config = (char *) NULL;
-            file_ios = (char *) NULL;
             char verbose = 0x00;
 
             type = processing_multithread;
 
-            while ((c = getopt(argc,argv, "hc:i:sv")) != -1) {
+            while ((c = getopt(argc,argv, "c:hsv")) != -1) {
 
                 switch(c) {
 
-                    case 'h':
-
-                        exit(EXIT_SUCCESS);
-
-                    break;
-
                     case 'c':
 
                         file_config = (char *) malloc(sizeof(char) * (strlen(optarg)+1));
 
                     break;
 
-                    case 'i':
+                    case 'h':
 
-                        file_ios = (char *) malloc(sizeof(char) * (strlen(optarg)+1));
-                        strcpy(file_ios, optarg);
+                        exit(EXIT_SUCCESS);
 
                     break;
 
                 printf("Missing configuration file.\n");
                 exit(EXIT_FAILURE);
             }
-            if (file_ios == NULL) {
-                printf("Missing ios file.\n");
-                exit(EXIT_FAILURE);
-            }
 
         // +------------------------------------------------------+
         // | Copyright                                            |
 
                 if (verbose == 0x01) printf("  + Initializing configurations...... "); fflush(stdout); 
 
-                cfgs = configs_construct(file_config, file_ios);
+                cfgs = configs_construct(file_config);
 
                 if (verbose == 0x01) printf("[Done]\n");
 
                 objects_destroy(objs);
                 configs_destroy(cfgs);
                 free((void *) file_config);
-                free((void *) file_ios);
 
                 if (verbose == 0x01) printf("[Done]\n");
 
 
                 if (verbose == 0x01) printf("  + Initializing configurations...... "); fflush(stdout); 
 
-                cfgs = configs_construct(file_config, file_ios);
+                cfgs = configs_construct(file_config);
 
                 if (verbose == 0x01) printf("[Done]\n");
 
                 aobjects_destroy(aobjs);
                 configs_destroy(cfgs);
                 free((void *) file_config);
-                free((void *) file_ios);
 
                 if (verbose == 0x01) printf("[Done]\n");
 
index 5560d60dfb17d15b56fa73978df7bbce93debba9..d35b909b09cf760bbed7a6204c376467df851cff 100644 (file)
                 // | Source                                           |
                 // +--------------------------------------------------+  
 
-                    objs->src_hops_raw_object = src_hops_construct(cfgs->src_hops_raw_config, 
-                                                                   cfgs->msg_hops_raw_config);
+                    objs->src_hops_mics_object = src_hops_construct(cfgs->src_hops_mics_config, 
+                                                                    cfgs->msg_hops_mics_raw_config);
 
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    objs->msg_hops_raw_object = msg_hops_construct(cfgs->msg_hops_raw_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->snk_hops_raw_object_count = cfgs->snk_hops_raw_config_count;
-                    objs->snk_hops_raw_objects = (snk_hops_obj **) malloc(sizeof(snk_hops_obj *) * cfgs->snk_hops_raw_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_hops_raw_object_count; iSink++) {
-
-                        objs->snk_hops_raw_objects[iSink] = snk_hops_construct(cfgs->snk_hops_raw_configs[iSink], 
-                                                                               cfgs->msg_hops_raw_config);
-
-                    }
+                    objs->msg_hops_mics_raw_object = msg_hops_construct(cfgs->msg_hops_mics_raw_config);
 
             // +------------------------------------------------------+
             // | Mapping                                              |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->mod_mapping_object = mod_mapping_construct(cfgs->mod_mapping_config, 
-                                                                     cfgs->msg_hops_mapping_config);
+                    objs->mod_mapping_mics_object = mod_mapping_construct(cfgs->mod_mapping_mics_config, 
+                                                                          cfgs->msg_hops_mics_map_config);
 
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    objs->msg_hops_mapping_object = msg_hops_construct(cfgs->msg_hops_mapping_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->snk_hops_mapping_object_count = cfgs->snk_hops_mapping_config_count;
-                    objs->snk_hops_mapping_objects = (snk_hops_obj **) malloc(sizeof(snk_hops_obj *) * cfgs->snk_hops_mapping_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_hops_mapping_object_count; iSink++) {
-
-                        objs->snk_hops_mapping_objects[iSink] = snk_hops_construct(cfgs->snk_hops_mapping_configs[iSink], 
-                                                                                   cfgs->msg_hops_mapping_config);
-
-                    }
+                    objs->msg_hops_mics_map_object = msg_hops_construct(cfgs->msg_hops_mics_map_config);
 
             // +------------------------------------------------------+
             // | Resample                                             |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->mod_resample_object = mod_resample_construct(cfgs->mod_resample_config, 
-                                                                       cfgs->msg_hops_mapping_config, 
-                                                                       cfgs->msg_hops_resample_config);
+                    objs->mod_resample_mics_object = mod_resample_construct(cfgs->mod_resample_mics_config, 
+                                                                            cfgs->msg_hops_mics_map_config, 
+                                                                            cfgs->msg_hops_mics_rs_config);
 
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    objs->msg_hops_resample_object = msg_hops_construct(cfgs->msg_hops_resample_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->snk_hops_resample_object_count = cfgs->snk_hops_resample_config_count;
-                    objs->snk_hops_resample_objects = (snk_hops_obj **) malloc(sizeof(asnk_hops_obj *) * cfgs->snk_hops_resample_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_hops_resample_object_count; iSink++) {
-
-                        objs->snk_hops_resample_objects[iSink] = snk_hops_construct(cfgs->snk_hops_resample_configs[iSink], 
-                                                                                    cfgs->msg_hops_resample_config);
-
-                    }
+                    objs->msg_hops_mics_rs_object = msg_hops_construct(cfgs->msg_hops_mics_rs_config);
 
             // +------------------------------------------------------+
             // | STFT                                                 |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->mod_stft_object = mod_stft_construct(cfgs->mod_stft_config, 
-                                                               cfgs->msg_hops_resample_config, 
-                                                               cfgs->msg_spectra_stft_config);
+                    objs->mod_stft_mics_object = mod_stft_construct(cfgs->mod_stft_mics_config, 
+                                                                    cfgs->msg_hops_mics_rs_config, 
+                                                                    cfgs->msg_spectra_mics_config);
 
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    objs->msg_spectra_stft_object = msg_spectra_construct(cfgs->msg_spectra_stft_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->snk_spectra_stft_object_count = cfgs->snk_spectra_stft_config_count;
-                    objs->snk_spectra_stft_objects = (snk_spectra_obj **) malloc(sizeof(snk_spectra_obj *) * cfgs->snk_spectra_stft_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_spectra_stft_object_count; iSink++) {
-
-                        objs->snk_spectra_stft_objects[iSink] = snk_spectra_construct(cfgs->snk_spectra_stft_configs[iSink], 
-                                                                                      cfgs->msg_spectra_stft_config);
-
-                    }
+                    objs->msg_spectra_mics_object = msg_spectra_construct(cfgs->msg_spectra_mics_config);
 
             // +------------------------------------------------------+
             // | SSL                                                  |
                 // +--------------------------------------------------+  
 
                     objs->mod_ssl_object = mod_ssl_construct(cfgs->mod_ssl_config, 
-                                                             cfgs->msg_spectra_stft_config,
+                                                             cfgs->msg_spectra_mics_config,
                                                              cfgs->msg_pots_ssl_config);
 
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    objs->snk_pots_ssl_object_count = cfgs->snk_pots_ssl_config_count;
-                    objs->snk_pots_ssl_objects = (snk_pots_obj **) malloc(sizeof(snk_pots_obj *) * cfgs->snk_pots_ssl_config_count);
+                    objs->snk_pots_ssl_object = snk_pots_construct(cfgs->snk_pots_ssl_config, 
+                                                                   cfgs->msg_pots_ssl_config);
 
-                    for (iSink = 0; iSink < objs->snk_pots_ssl_object_count; iSink++) {
-
-                        objs->snk_pots_ssl_objects[iSink] = snk_pots_construct(cfgs->snk_pots_ssl_configs[iSink], 
-                                                                               cfgs->msg_pots_ssl_config);
-
-                    }
 
             // +------------------------------------------------------+
             // | SST                                                  |
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    objs->snk_tracks_sst_object_count = cfgs->snk_tracks_sst_config_count;
-                    objs->snk_tracks_sst_objects = (snk_tracks_obj **) malloc(sizeof(snk_tracks_obj *) * cfgs->snk_tracks_sst_config_count);
+                    objs->snk_tracks_sst_object = snk_tracks_construct(cfgs->snk_tracks_sst_config, 
+                                                                       cfgs->msg_tracks_sst_config);
 
-                    for (iSink = 0; iSink < objs->snk_tracks_sst_object_count; iSink++) {
+        // +----------------------------------------------------------+
+        // | Connect                                                  |
+        // +----------------------------------------------------------+  
 
-                        objs->snk_tracks_sst_objects[iSink] = snk_tracks_construct(cfgs->snk_tracks_sst_configs[iSink], 
-                                                                                   cfgs->msg_tracks_sst_config);
+            objs->con_hops_mics_raw_object = con_hops_construct(1, cfgs->msg_hops_mics_raw_config);
 
-                    }
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
+            objs->con_hops_mics_map_object = con_hops_construct(1, cfgs->msg_hops_mics_map_config);
 
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
+            objs->con_hops_mics_rs_object = con_hops_construct(1, cfgs->msg_hops_mics_rs_config);
 
-                    objs->mod_sss_object = mod_sss_construct(cfgs->mod_sss_config, 
-                                                             cfgs->msg_tracks_sst_config, 
-                                                             cfgs->msg_spectra_sss_config, 
-                                                             cfgs->msg_envs_sss_config);
+            objs->con_spectra_mics_object = con_spectra_construct(1, cfgs->msg_spectra_mics_config);
 
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
+            objs->con_pots_ssl_object = con_pots_construct(2, cfgs->msg_pots_ssl_config);
+
+            objs->con_tracks_sst_object = con_tracks_construct(1, cfgs->msg_tracks_sst_config);
 
-                    objs->msg_spectra_sss_object = msg_spectra_construct(cfgs->msg_spectra_sss_config);
+            // +------------------------------------------------------+
+            // | Raw                                                  |
+            // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Source                                           |
                 // +--------------------------------------------------+  
 
-                    objs->snk_spectra_sss_object_count = cfgs->snk_spectra_sss_config_count;
-                    objs->snk_spectra_sss_objects = (snk_spectra_obj **) malloc(sizeof(snk_spectra_obj *) * cfgs->snk_spectra_sss_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_spectra_sss_object_count; iSink++) {
-
-                        objs->snk_spectra_sss_objects[iSink] = snk_spectra_construct(cfgs->snk_spectra_sss_configs[iSink], 
-                                                                                     cfgs->msg_spectra_sss_config);
-
-                    }
+                    src_hops_connect(objs->src_hops_mics_object, 
+                                     objs->con_hops_mics_raw_object->in);
 
             // +------------------------------------------------------+
-            // | SSPF                                                 |
+            // | Mapping                                              |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->mod_sspf_object = mod_sspf_construct(cfgs->mod_sspf_config, 
-                                                              cfgs->msg_tracks_sst_config, 
-                                                              cfgs->msg_spectra_sspf_config, 
-                                                              cfgs->msg_envs_sss_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
+                    mod_mapping_connect(objs->mod_mapping_mics_object, 
+                                        objs->con_hops_mics_raw_object->outs[0], 
+                                        objs->con_hops_mics_map_object->in);
 
-                    objs->msg_spectra_sspf_object = msg_spectra_construct(cfgs->msg_spectra_sspf_config);
+            // +------------------------------------------------------+
+            // | Resample                                             |
+            // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->snk_spectra_sspf_object_count = cfgs->snk_spectra_sspf_config_count;
-                    objs->snk_spectra_sspf_objects = (snk_spectra_obj **) malloc(sizeof(snk_spectra_obj *) * cfgs->snk_spectra_sspf_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_spectra_sspf_object_count; iSink++) {
-
-                        objs->snk_spectra_sspf_objects[iSink] = snk_spectra_construct(cfgs->snk_spectra_sspf_configs[iSink], 
-                                                                                      cfgs->msg_spectra_sspf_config);
-
-                    }
+                    mod_resample_connect(objs->mod_resample_mics_object, 
+                                         objs->con_hops_mics_map_object->outs[0], 
+                                         objs->con_hops_mics_rs_object->in);
 
             // +------------------------------------------------------+
-            // | ISTFT                                                |
+            // | STFT                                                 |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->mod_istft_object = mod_istft_construct(cfgs->mod_istft_config, 
-                                                                 cfgs->msg_spectra_sspf_config, 
-                                                                 cfgs->msg_hops_istft_config);
+                    mod_stft_connect(objs->mod_stft_mics_object, 
+                                     objs->con_hops_mics_rs_object->outs[0], 
+                                     objs->con_spectra_mics_object->in);
+
+            // +------------------------------------------------------+
+            // | SSL                                                  |
+            // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
-                // | Message                                          |
+                // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->msg_hops_istft_object = msg_hops_construct(cfgs->msg_hops_istft_config);
+                    mod_ssl_connect(objs->mod_ssl_object, 
+                                    objs->con_spectra_mics_object->outs[0], 
+                                    objs->con_pots_ssl_object->in);
 
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    objs->snk_hops_istft_object_count = cfgs->snk_hops_istft_config_count;
-                    objs->snk_hops_istft_objects = (snk_hops_obj **) malloc(sizeof(snk_hops_obj *) * cfgs->snk_hops_istft_config_count);
-
-                    for (iSink = 0; iSink < objs->snk_hops_istft_object_count; iSink++) {
-
-                        objs->snk_hops_istft_objects[iSink] = snk_hops_construct(cfgs->snk_hops_istft_configs[iSink], 
-                                                                                 cfgs->msg_hops_istft_config);
-
-                    }
+                    snk_pots_connect(objs->snk_pots_ssl_object,
+                                     objs->con_pots_ssl_object->outs[1]);
 
             // +------------------------------------------------------+
-            // | Gain                                                 |
+            // | SST                                                  |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    objs->mod_gain_object = mod_gain_construct(cfgs->mod_gain_config, 
-                                                               cfgs->msg_hops_gain_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->msg_hops_gain_object = msg_hops_construct(cfgs->msg_hops_gain_config);
+                    mod_sst_connect(objs->mod_sst_object, 
+                                    objs->con_pots_ssl_object->outs[0], 
+                                    objs->con_tracks_sst_object->in);
 
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    objs->snk_hops_gain_object_count = cfgs->snk_hops_gain_config_count;
-                    objs->snk_hops_gain_objects = (snk_hops_obj **) malloc(sizeof(snk_hops_obj *) * cfgs->snk_hops_gain_config_count);
+                    snk_tracks_connect(objs->snk_tracks_sst_object,
+                                       objs->con_tracks_sst_object->outs[0]);
 
-                    for (iSink = 0; iSink < objs->snk_hops_gain_object_count; iSink++) {
-
-                        objs->snk_hops_gain_objects[iSink] = snk_hops_construct(cfgs->snk_hops_gain_configs[iSink], 
-                                                                                cfgs->msg_hops_gain_config);
-
-                    }
-*/
-        // +----------------------------------------------------------+
-        // | Connect                                                  |
-        // +----------------------------------------------------------+  
+        return objs;
 
-            // Hops ....... Raw ........ (0): Mapping Hops
-            //                  ........ (1): Sink 1
-            //                  ........ (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... Mapping .... (0): Resample Hops
-            //                      .... (1): Sink 1
-            //                      .... (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... Resample ... (0): STFT Hops
-            //                       ... (1): Sink 1
-            //                       ... (2): Sink 2
-            //                                etc.
-            //
-            // Spectra .... STFT ....... (0): SSL
-            //                   ....... (1): SSS
-            //                   ....... (2): Sink 1
-            //                   ....... (3): Sink 2
-            //                                etc.
-            //
-            // Pots ....... SSL ........ (0): SST
-            //                  ........ (1): Sink 1
-            //                  ........ (2): Sink 2
-            //                                etc.
-            //
-            // Tracks ..... SST ........ (0): SSS
-            //                  ........ (1): SSPF
-            //                  ........ (2): Sink 1
-            //                  ........ (3): Sink 2
-            //                                etc.
-            //
-            // Spectra .... SSS ........ (0): SSPF
-            //                  ........ (1): Sink 1
-            //                  ........ (2): Sink 2
-            //                                etc.
-            //
-            // Envs ....... SSS ........ (0): SSPF
-            //
-            // Spectra .... SSPF ....... (0): ISTFT
-            //                   ....... (1): Sink 1
-            //                   ....... (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... ISTFT ...... (0): Gain
-            //                    ...... (1): Sink 1
-            //                    ...... (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... Gain ....... (0): Sink 1
-            //                   ....... (1): Sink 2
-            //                                etc.
-
-            objs->con_hops_raw_object = con_hops_construct(objs->snk_hops_raw_object_count + 1, 
-                                                           cfgs->msg_hops_raw_config);
-
-            objs->con_hops_mapping_object = con_hops_construct(objs->snk_hops_mapping_object_count + 1, 
-                                                               cfgs->msg_hops_mapping_config);
-
-            objs->con_hops_resample_object = con_hops_construct(objs->snk_hops_resample_object_count + 1, 
-                                                                cfgs->msg_hops_resample_config);
-
-            objs->con_spectra_stft_object = con_spectra_construct(objs->snk_spectra_stft_object_count + 1, 
-                                                                  cfgs->msg_spectra_stft_config);
-
-            objs->con_pots_ssl_object = con_pots_construct(objs->snk_pots_ssl_object_count + 1, 
-                                                           cfgs->msg_pots_ssl_config);
-
-            objs->con_tracks_sst_object = con_tracks_construct(objs->snk_tracks_sst_object_count + 0, 
-                                                               cfgs->msg_tracks_sst_config);
-/*
-            objs->con_spectra_sss_object = con_spectra_construct(objs->snk_spectra_sss_object_count + 1, 
-                                                                 cfgs->msg_spectra_sss_config);
+    }
 
-            objs->con_envs_sss_object = con_envs_construct(1,
-                                                           cfgs->msg_envs_sss_config);
+    void objects_destroy(objects * objs) {
 
-            objs->con_spectra_sspf_object = con_spectra_construct(objs->snk_spectra_sspf_object_count + 1, 
-                                                                  cfgs->msg_spectra_sspf_config);
+        unsigned int iSink;
 
-            objs->con_hops_istft_object = con_hops_construct(objs->snk_hops_istft_object_count + 1,
-                                                             cfgs->msg_hops_istft_config);
+        // +----------------------------------------------------------+
+        // | Destroy                                                  |
+        // +----------------------------------------------------------+
 
-            objs->con_hops_gain_object = con_hops_construct(objs->snk_hops_gain_object_count,
-                                                            cfgs->msg_hops_gain_config);
-*/
             // +------------------------------------------------------+
             // | Raw                                                  |
             // +------------------------------------------------------+  
                 // | Source                                           |
                 // +--------------------------------------------------+  
 
-                    src_hops_connect(objs->src_hops_raw_object, 
-                                     objs->con_hops_raw_object->in);
-
+                    src_hops_destroy(objs->src_hops_mics_object);
+                    
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_raw_object_count; iSink++) {
-                        
-                        snk_hops_connect(objs->snk_hops_raw_objects[iSink], 
-                                         objs->con_hops_raw_object->outs[iSink + 1]);
+                    msg_hops_destroy(objs->msg_hops_mics_raw_object);
+
+                // +--------------------------------------------------+
+                // | Connector                                        |
+                // +--------------------------------------------------+  
 
-                    }
+                    con_hops_destroy(objs->con_hops_mics_raw_object);
 
             // +------------------------------------------------------+
             // | Mapping                                              |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_mapping_connect(objs->mod_mapping_object, 
-                                        objs->con_hops_raw_object->outs[0], 
-                                        objs->con_hops_mapping_object->in);
-
+                    mod_mapping_destroy(objs->mod_mapping_mics_object);
+                    
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_mapping_object_count; iSink++) {
+                    msg_hops_destroy(objs->msg_hops_mics_map_object);                  
 
-                        snk_hops_connect(objs->snk_hops_mapping_objects[iSink],
-                                         objs->con_hops_mapping_object->outs[iSink + 1]);
+                // +--------------------------------------------------+
+                // | Connector                                        |
+                // +--------------------------------------------------+  
 
-                    }
+                    con_hops_destroy(objs->con_hops_mics_map_object);             
 
             // +------------------------------------------------------+
             // | Resample                                             |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_resample_connect(objs->mod_resample_object, 
-                                         objs->con_hops_mapping_object->outs[0], 
-                                         objs->con_hops_resample_object->in);
-
+                    mod_resample_destroy(objs->mod_resample_mics_object);
+                    
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_resample_object_count; iSink++) {
-
-                        snk_hops_connect(objs->snk_hops_resample_objects[iSink],
-                                         objs->con_hops_resample_object->outs[iSink + 1]);
+                    msg_hops_destroy(objs->msg_hops_mics_rs_object);
+                    
+                // +--------------------------------------------------+
+                // | Connector                                        |
+                // +--------------------------------------------------+  
 
-                    }
+                    con_hops_destroy(objs->con_hops_mics_rs_object);    
 
             // +------------------------------------------------------+
             // | STFT                                                 |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_stft_connect(objs->mod_stft_object, 
-                                     objs->con_hops_resample_object->outs[0], 
-                                     objs->con_spectra_stft_object->in);
-
+                    mod_stft_destroy(objs->mod_stft_mics_object);
+                    
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_spectra_stft_object_count; iSink++) {
-
-                        snk_spectra_connect(objs->snk_spectra_stft_objects[iSink],
-                                            objs->con_spectra_stft_object->outs[iSink + 1]);
+                    msg_spectra_destroy(objs->msg_spectra_mics_object);
+                    
+                // +--------------------------------------------------+
+                // | Connector                                        |
+                // +--------------------------------------------------+  
 
-                    }
+                    con_spectra_destroy(objs->con_spectra_mics_object);   
 
             // +------------------------------------------------------+
             // | SSL                                                  |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_ssl_connect(objs->mod_ssl_object, 
-                                    objs->con_spectra_stft_object->outs[0], 
-                                    objs->con_pots_ssl_object->in);
+                    mod_ssl_destroy(objs->mod_ssl_object);
+                    
+                // +--------------------------------------------------+
+                // | Message                                          |
+                // +--------------------------------------------------+  
 
+                    msg_pots_destroy(objs->msg_pots_ssl_object);
+                    
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_pots_ssl_object_count; iSink++) {
+                    snk_pots_destroy(objs->snk_pots_ssl_object);
 
-                        snk_pots_connect(objs->snk_pots_ssl_objects[iSink],
-                                         objs->con_pots_ssl_object->outs[iSink + 1]);
+                // +--------------------------------------------------+
+                // | Connector                                        |
+                // +--------------------------------------------------+  
 
-                    }
+                    con_pots_destroy(objs->con_pots_ssl_object);   
 
             // +------------------------------------------------------+
             // | SST                                                  |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_sst_connect(objs->mod_sst_object, 
-                                    objs->con_pots_ssl_object->outs[0], 
-                                    objs->con_tracks_sst_object->in);
+                    mod_sst_destroy(objs->mod_sst_object);
+                    
+                // +--------------------------------------------------+
+                // | Message                                          |
+                // +--------------------------------------------------+  
 
+                    msg_tracks_destroy(objs->msg_tracks_sst_object);
+                    
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_tracks_sst_object_count; iSink++) {
-
-                        snk_tracks_connect(objs->snk_tracks_sst_objects[iSink],
-                                           objs->con_tracks_sst_object->outs[iSink + 0]);
-
-                    }
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
+                    snk_tracks_destroy(objs->snk_tracks_sst_object);
 
                 // +--------------------------------------------------+
-                // | Module                                           |
+                // | Connector                                        |
                 // +--------------------------------------------------+  
 
-                    mod_sss_connect(objs->mod_sss_object,
-                                    objs->con_spectra_stft_object->outs[1],
-                                    objs->con_tracks_sst_object->outs[0],
-                                    objs->con_spectra_sss_object->in,
-                                    objs->con_envs_sss_object->in);
+                    con_tracks_destroy(objs->con_tracks_sst_object); 
 
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
+        free((void *) objs);
+
+    }
+
+    aobjects * aobjects_construct(const configs * cfgs) {
+
+        aobjects * objs;
+        unsigned int iSink;
 
-                    for (iSink = 0; iSink < objs->snk_spectra_sss_object_count; iSink++) {
+        objs = (aobjects *) malloc(sizeof(aobjects));
 
-                        snk_spectra_connect(objs->snk_spectra_sss_objects[iSink],
-                                            objs->con_spectra_sss_object->outs[iSink + 1]);
+        objs->nMessages = 100;
 
-                    }
+        // +----------------------------------------------------------+
+        // | Construct                                                |
+        // +----------------------------------------------------------+
 
             // +------------------------------------------------------+
-            // | SSPF                                                 |
+            // | Raw                                                  |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
-                // | Module                                           |
+                // | Source                                           |
                 // +--------------------------------------------------+  
 
-                    mod_sspf_connect(objs->mod_sspf_object,
-                                     objs->con_spectra_sss_object->outs[0],
-                                     objs->con_envs_sss_object->outs[0],
-                                     objs->con_tracks_sst_object->outs[1],
-                                     objs->con_spectra_sspf_object->in);
-
+                    objs->asrc_hops_mics_object = asrc_hops_construct(cfgs->src_hops_mics_config, 
+                                                                      cfgs->msg_hops_mics_raw_config);
+                
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_spectra_sspf_object_count; iSink++) {
-
-                        snk_spectra_connect(objs->snk_spectra_sspf_objects[iSink],
-                                            objs->con_spectra_sspf_object->outs[iSink + 1]);
-
-                    }                    
+                    objs->amsg_hops_mics_raw_object = amsg_hops_construct(objs->nMessages, 
+                                                                          cfgs->msg_hops_mics_raw_config);
 
             // +------------------------------------------------------+
-            // | ISTFT                                                |
+            // | Mapping                                              |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_istft_connect(objs->mod_istft_object,
-                                      objs->con_spectra_sspf_object->outs[0],
-                                      objs->con_hops_istft_object->in);
+                    objs->amod_mapping_mics_object = amod_mapping_construct(cfgs->mod_mapping_mics_config, 
+                                                                            cfgs->msg_hops_mics_map_config);
 
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_istft_object_count; iSink++) {
-
-                        snk_hops_connect(objs->snk_hops_istft_objects[iSink],
-                                         objs->con_hops_istft_object->outs[iSink + 1]);
-
-                    }      
+                    objs->amsg_hops_mics_map_object = amsg_hops_construct(objs->nMessages, 
+                                                                          cfgs->msg_hops_mics_map_config);
 
             // +------------------------------------------------------+
-            // | Gain                                                 |
+            // | Resample                                             |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_gain_connect(objs->mod_gain_object,
-                                     objs->con_hops_istft_object->outs[0],
-                                     objs->con_hops_gain_object->in);
+                    objs->amod_resample_mics_object = amod_resample_construct(cfgs->mod_resample_mics_config, 
+                                                                              cfgs->msg_hops_mics_map_config, 
+                                                                              cfgs->msg_hops_mics_rs_config);
 
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_gain_object_count; iSink++) {
-
-                        snk_hops_connect(objs->snk_hops_gain_objects[iSink],
-                                         objs->con_hops_gain_object->outs[iSink]);
-
-                    }  
-*/
-        return objs;
-
-    }
-
-    void objects_destroy(objects * objs) {
-
-        unsigned int iSink;
-
-        // +----------------------------------------------------------+
-        // | Destroy                                                  |
-        // +----------------------------------------------------------+
+                    objs->amsg_hops_mics_rs_object = amsg_hops_construct(objs->nMessages, 
+                                                                         cfgs->msg_hops_mics_rs_config);
 
             // +------------------------------------------------------+
-            // | Raw                                                  |
+            // | STFT                                                 |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
-                // | Source                                           |
+                // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    src_hops_destroy(objs->src_hops_raw_object);
-                    
+                    objs->amod_stft_mics_object = amod_stft_construct(cfgs->mod_stft_mics_config, 
+                                                                      cfgs->msg_hops_mics_rs_config, 
+                                                                      cfgs->msg_spectra_mics_config);
+
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    msg_hops_destroy(objs->msg_hops_raw_object);
-                    
+                    objs->amsg_spectra_mics_object = amsg_spectra_construct(objs->nMessages, 
+                                                                            cfgs->msg_spectra_mics_config);
+
+            // +------------------------------------------------------+
+            // | SSL                                                  |
+            // +------------------------------------------------------+  
+
                 // +--------------------------------------------------+
-                // | Sinks                                            |
+                // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_raw_object_count; iSink++) {
-
-                        snk_hops_destroy(objs->snk_hops_raw_objects[iSink]);
+                    objs->amod_ssl_object = amod_ssl_construct(cfgs->mod_ssl_config, 
+                                                               cfgs->msg_spectra_mics_config, 
+                                                               cfgs->msg_pots_ssl_config);
 
-                    }
+                // +--------------------------------------------------+
+                // | Message                                          |
+                // +--------------------------------------------------+  
 
-                    free((void *) objs->snk_hops_raw_objects);
+                    objs->amsg_pots_ssl_object = amsg_pots_construct(objs->nMessages, 
+                                                                     cfgs->msg_pots_ssl_config);
 
                 // +--------------------------------------------------+
-                // | Connector                                        |
+                // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    con_hops_destroy(objs->con_hops_raw_object);
+                    objs->asnk_pots_ssl_object = asnk_pots_construct(cfgs->snk_pots_ssl_config, 
+                                                                     cfgs->msg_pots_ssl_config);
 
             // +------------------------------------------------------+
-            // | Mapping                                              |
+            // | SST                                                  |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    mod_mapping_destroy(objs->mod_mapping_object);
-                    
+                    objs->amod_sst_object = amod_sst_construct(cfgs->mod_sst_config, 
+                                                               cfgs->mod_ssl_config, 
+                                                               cfgs->msg_pots_ssl_config, 
+                                                               cfgs->msg_tracks_sst_config);
+
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    msg_hops_destroy(objs->msg_hops_mapping_object);
-                    
+                    objs->amsg_tracks_sst_object = amsg_tracks_construct(objs->nMessages, 
+                                                                         cfgs->msg_tracks_sst_config);
+
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->snk_hops_mapping_object_count; iSink++) {
+                    objs->asnk_tracks_sst_object = asnk_tracks_construct(cfgs->snk_tracks_sst_config, 
+                                                                         cfgs->msg_tracks_sst_config);
+
+        // +----------------------------------------------------------+
+        // | Connect                                                  |
+        // +----------------------------------------------------------+  
+
+            objs->acon_hops_mics_raw_object = acon_hops_construct(1, objs->nMessages, cfgs->msg_hops_mics_raw_config);
 
-                        snk_hops_destroy(objs->snk_hops_mapping_objects[iSink]);
+            objs->acon_hops_mics_map_object = acon_hops_construct(1, objs->nMessages, cfgs->msg_hops_mics_map_config);
 
-                    }
+            objs->acon_hops_mics_rs_object = acon_hops_construct(1, objs->nMessages, cfgs->msg_hops_mics_rs_config);
 
-                    free((void *) objs->snk_hops_mapping_objects);
+            objs->acon_spectra_mics_object = acon_spectra_construct(1, objs->nMessages, cfgs->msg_spectra_mics_config);
 
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
+            objs->acon_pots_ssl_object = acon_pots_construct(2, objs->nMessages, cfgs->msg_pots_ssl_config);
 
-                    con_hops_destroy(objs->con_hops_mapping_object);             
+            objs->acon_tracks_sst_object = acon_tracks_construct(1, objs->nMessages, cfgs->msg_tracks_sst_config);
 
             // +------------------------------------------------------+
-            // | Resample                                             |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_resample_destroy(objs->mod_resample_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_hops_destroy(objs->msg_hops_resample_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_hops_resample_object_count; iSink++) {
-
-                        snk_hops_destroy(objs->snk_hops_resample_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_hops_resample_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_hops_destroy(objs->con_hops_resample_object);    
-
-            // +------------------------------------------------------+
-            // | STFT                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_stft_destroy(objs->mod_stft_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_spectra_destroy(objs->msg_spectra_stft_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_spectra_stft_object_count; iSink++) {
-
-                        snk_spectra_destroy(objs->snk_spectra_stft_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_spectra_stft_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_spectra_destroy(objs->con_spectra_stft_object);   
-
-            // +------------------------------------------------------+
-            // | SSL                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_ssl_destroy(objs->mod_ssl_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_pots_destroy(objs->msg_pots_ssl_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_pots_ssl_object_count; iSink++) {
-
-                        snk_pots_destroy(objs->snk_pots_ssl_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_pots_ssl_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_pots_destroy(objs->con_pots_ssl_object);   
-
-            // +------------------------------------------------------+
-            // | SST                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_sst_destroy(objs->mod_sst_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_tracks_destroy(objs->msg_tracks_sst_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_tracks_sst_object_count; iSink++) {
-
-                        snk_tracks_destroy(objs->snk_tracks_sst_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_tracks_sst_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_tracks_destroy(objs->con_tracks_sst_object);   
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_sss_destroy(objs->mod_sss_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_spectra_destroy(objs->msg_spectra_sss_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_spectra_sss_object_count; iSink++) {
-
-                        snk_spectra_destroy(objs->snk_spectra_sss_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_spectra_sss_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_spectra_destroy(objs->con_spectra_sss_object);   
-                    con_envs_destroy(objs->con_envs_sss_object);
-
-            // +------------------------------------------------------+
-            // | SSPF                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_sspf_destroy(objs->mod_sspf_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_spectra_destroy(objs->msg_spectra_sspf_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_spectra_sspf_object_count; iSink++) {
-
-                        snk_spectra_destroy(objs->snk_spectra_sspf_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_spectra_sspf_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_spectra_destroy(objs->con_spectra_sspf_object);   
-
-            // +------------------------------------------------------+
-            // | ISTFT                                                |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_istft_destroy(objs->mod_istft_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_hops_destroy(objs->msg_hops_istft_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_hops_istft_object_count; iSink++) {
-
-                        snk_hops_destroy(objs->snk_hops_istft_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_hops_istft_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_hops_destroy(objs->con_hops_istft_object);                       
-
-            // +------------------------------------------------------+
-            // | Gain                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    mod_gain_destroy(objs->mod_gain_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    msg_hops_destroy(objs->msg_hops_gain_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->snk_hops_gain_object_count; iSink++) {
-
-                        snk_hops_destroy(objs->snk_hops_gain_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->snk_hops_gain_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    con_hops_destroy(objs->con_hops_gain_object);                      
-*/
-        free((void *) objs);
-
-    }
-
-    aobjects * aobjects_construct(const configs * cfgs) {
-
-        aobjects * objs;
-        unsigned int iSink;
-
-        objs = (aobjects *) malloc(sizeof(aobjects));
-
-        objs->nMessages = 100;
-
-        // +----------------------------------------------------------+
-        // | Construct                                                |
-        // +----------------------------------------------------------+
-
-            // +------------------------------------------------------+
-            // | Raw                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Source                                           |
-                // +--------------------------------------------------+  
-
-                    objs->asrc_hops_raw_object = asrc_hops_construct(cfgs->src_hops_raw_config, 
-                                                                     cfgs->msg_hops_raw_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_hops_raw_object = amsg_hops_construct(objs->nMessages, 
-                                                                     cfgs->msg_hops_raw_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_hops_raw_object_count = cfgs->snk_hops_raw_config_count;
-                    objs->asnk_hops_raw_objects = (asnk_hops_obj **) malloc(sizeof(asnk_hops_obj *) * cfgs->snk_hops_raw_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_hops_raw_object_count; iSink++) {
-
-                        objs->asnk_hops_raw_objects[iSink] = asnk_hops_construct(cfgs->snk_hops_raw_configs[iSink], 
-                                                                                 cfgs->msg_hops_raw_config);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | Mapping                                              |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_mapping_object = amod_mapping_construct(cfgs->mod_mapping_config, 
-                                                                       cfgs->msg_hops_mapping_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_hops_mapping_object = amsg_hops_construct(objs->nMessages, 
-                                                                         cfgs->msg_hops_mapping_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_hops_mapping_object_count = cfgs->snk_hops_mapping_config_count;
-                    objs->asnk_hops_mapping_objects = (asnk_hops_obj **) malloc(sizeof(asnk_hops_obj *) * cfgs->snk_hops_mapping_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_hops_mapping_object_count; iSink++) {
-
-                        objs->asnk_hops_mapping_objects[iSink] = asnk_hops_construct(cfgs->snk_hops_mapping_configs[iSink], 
-                                                                                     cfgs->msg_hops_mapping_config);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | Resample                                             |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_resample_object = amod_resample_construct(cfgs->mod_resample_config, 
-                                                                         cfgs->msg_hops_mapping_config, 
-                                                                         cfgs->msg_hops_resample_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_hops_resample_object = amsg_hops_construct(objs->nMessages, 
-                                                                          cfgs->msg_hops_resample_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_hops_resample_object_count = cfgs->snk_hops_resample_config_count;
-                    objs->asnk_hops_resample_objects = (asnk_hops_obj **) malloc(sizeof(asnk_hops_obj *) * cfgs->snk_hops_resample_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_hops_resample_object_count; iSink++) {
-
-                        objs->asnk_hops_resample_objects[iSink] = asnk_hops_construct(cfgs->snk_hops_resample_configs[iSink], 
-                                                                                      cfgs->msg_hops_resample_config);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | STFT                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_stft_object = amod_stft_construct(cfgs->mod_stft_config, 
-                                                                 cfgs->msg_hops_resample_config, 
-                                                                 cfgs->msg_spectra_stft_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_spectra_stft_object = amsg_spectra_construct(objs->nMessages, 
-                                                                            cfgs->msg_spectra_stft_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_spectra_stft_object_count = cfgs->snk_spectra_stft_config_count;
-                    objs->asnk_spectra_stft_objects = (asnk_spectra_obj **) malloc(sizeof(asnk_spectra_obj *) * cfgs->snk_spectra_stft_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_stft_object_count; iSink++) {
-
-                        objs->asnk_spectra_stft_objects[iSink] = asnk_spectra_construct(cfgs->snk_spectra_stft_configs[iSink], 
-                                                                                        cfgs->msg_spectra_stft_config);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | SSL                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_ssl_object = amod_ssl_construct(cfgs->mod_ssl_config, 
-                                                               cfgs->msg_spectra_stft_config, 
-                                                               cfgs->msg_pots_ssl_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_pots_ssl_object = amsg_pots_construct(objs->nMessages, 
-                                                                     cfgs->msg_pots_ssl_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_pots_ssl_object_count = cfgs->snk_pots_ssl_config_count;
-                    objs->asnk_pots_ssl_objects = (asnk_pots_obj **) malloc(sizeof(asnk_pots_obj *) * cfgs->snk_pots_ssl_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_pots_ssl_object_count; iSink++) {
-
-                        objs->asnk_pots_ssl_objects[iSink] = asnk_pots_construct(cfgs->snk_pots_ssl_configs[iSink], 
-                                                                                 cfgs->msg_pots_ssl_config);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | SST                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_sst_object = amod_sst_construct(cfgs->mod_sst_config, 
-                                                               cfgs->mod_ssl_config, 
-                                                               cfgs->msg_pots_ssl_config, 
-                                                               cfgs->msg_tracks_sst_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_tracks_sst_object = amsg_tracks_construct(objs->nMessages, 
-                                                                         cfgs->msg_tracks_sst_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_tracks_sst_object_count = cfgs->snk_tracks_sst_config_count;
-                    objs->asnk_tracks_sst_objects = (asnk_tracks_obj **) malloc(sizeof(asnk_tracks_obj *) * cfgs->snk_tracks_sst_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_tracks_sst_object_count; iSink++) {
-
-                        objs->asnk_tracks_sst_objects[iSink] = asnk_tracks_construct(cfgs->snk_tracks_sst_configs[iSink], 
-                                                                                     cfgs->msg_tracks_sst_config);
-
-                    }
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_sss_object = amod_sss_construct(cfgs->mod_sss_config, 
-                                                               cfgs->msg_tracks_sst_config,
-                                                               cfgs->msg_spectra_sss_config, 
-                                                               cfgs->msg_envs_sss_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_spectra_sss_object = amsg_spectra_construct(objs->nMessages, 
-                                                                           cfgs->msg_spectra_sss_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_spectra_sss_object_count = cfgs->snk_spectra_sss_config_count;
-                    objs->asnk_spectra_sss_objects = (asnk_spectra_obj **) malloc(sizeof(asnk_spectra_obj *) * cfgs->snk_spectra_sss_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_sss_object_count; iSink++) {
-
-                        objs->asnk_spectra_sss_objects[iSink] = asnk_spectra_construct(cfgs->snk_spectra_sss_configs[iSink], 
-                                                                                       cfgs->msg_spectra_sss_config);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | SSPF                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_sspf_object = amod_sspf_construct(cfgs->mod_sspf_config, 
-                                                                 cfgs->msg_tracks_sst_config,
-                                                                 cfgs->msg_spectra_sspf_config, 
-                                                                 cfgs->msg_envs_sss_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_spectra_sspf_object = amsg_spectra_construct(objs->nMessages, 
-                                                                            cfgs->msg_spectra_sspf_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_spectra_sspf_object_count = cfgs->snk_spectra_sspf_config_count;
-                    objs->asnk_spectra_sspf_objects = (asnk_spectra_obj **) malloc(sizeof(asnk_spectra_obj *) * cfgs->snk_spectra_sspf_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_sspf_object_count; iSink++) {
-
-                        objs->asnk_spectra_sspf_objects[iSink] = asnk_spectra_construct(cfgs->snk_spectra_sspf_configs[iSink], 
-                                                                                        cfgs->msg_spectra_sspf_config);
-
-                    }                    
-
-
-            // +------------------------------------------------------+
-            // | ISTFT                                                |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_istft_object = amod_istft_construct(cfgs->mod_istft_config, 
-                                                                   cfgs->msg_spectra_sspf_config, 
-                                                                   cfgs->msg_hops_istft_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_hops_istft_object = amsg_hops_construct(objs->nMessages, 
-                                                                       cfgs->msg_hops_istft_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_hops_istft_object_count = cfgs->snk_hops_istft_config_count;
-                    objs->asnk_hops_istft_objects = (asnk_hops_obj **) malloc(sizeof(asnk_hops_obj *) * cfgs->snk_hops_istft_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_hops_istft_object_count; iSink++) {
-
-                        objs->asnk_hops_istft_objects[iSink] = asnk_hops_construct(cfgs->snk_hops_istft_configs[iSink], 
-                                                                                   cfgs->msg_hops_istft_config);
-
-                    }                    
-
-            // +------------------------------------------------------+
-            // | Gain                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    objs->amod_gain_object = amod_gain_construct(cfgs->mod_gain_config, 
-                                                                 cfgs->msg_hops_gain_config);
-
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    objs->amsg_hops_gain_object = amsg_hops_construct(objs->nMessages, 
-                                                                      cfgs->msg_hops_gain_config);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    objs->asnk_hops_gain_object_count = cfgs->snk_hops_gain_config_count;
-                    objs->asnk_hops_gain_objects = (asnk_hops_obj **) malloc(sizeof(asnk_hops_obj *) * cfgs->snk_hops_gain_config_count);
-
-                    for (iSink = 0; iSink < objs->asnk_hops_gain_object_count; iSink++) {
-
-                        objs->asnk_hops_gain_objects[iSink] = asnk_hops_construct(cfgs->snk_hops_gain_configs[iSink], 
-                                                                                  cfgs->msg_hops_gain_config);
-
-                    }      
-*/
-        // +----------------------------------------------------------+
-        // | Connect                                                  |
-        // +----------------------------------------------------------+  
-
-            // Hops ....... Raw ........ (0): Mapping Hops
-            //                  ........ (1): Sink 1
-            //                  ........ (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... Mapping .... (0): Resample Hops
-            //                      .... (1): Sink 1
-            //                      .... (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... Resample ... (0): STFT Hops
-            //                       ... (1): Sink 1
-            //                       ... (2): Sink 2
-            //                                etc.
-            //
-            // Spectra .... STFT ....... (0): SSL
-            //                   ....... (1): SSS
-            //                   ....... (2): Sink 1
-            //                   ....... (3): Sink 2
-            //                                etc.
-            //
-            // Pots ....... SSL ........ (0): SST
-            //                  ........ (1): Sink 1
-            //                  ........ (2): Sink 2
-            //                                etc.
-            //
-            // Tracks ..... SST ........ (0): SSS
-            //                  ........ (1): SSPF
-            //                  ........ (2): Sink 1
-            //                  ........ (3): Sink 2
-            //                                etc.
-            //
-            // Spectra .... SSS ........ (0): SSPF
-            //                  ........ (1): Sink 1
-            //                  ........ (2): Sink 2
-            //                                etc.
-            //
-            // Envs ....... SSS ........ (0): SSPF
-            //
-            // Spectra .... SSPF ....... (0): ISTFT
-            //                   ....... (1): Sink 1
-            //                   ....... (2): Sink 2
-            //                                etc.
-            //
-            // Hops ...... ISTFT ....... (0): Gain
-            //                   ....... (1): Sink 1
-            //                   ....... (2): Sink 2
-            //                                etc.
-            //
-            // Hops ....... Gain ....... (0): Sink 1
-            //                   ....... (1): Sink 2
-            //                                etc.
-
-            objs->acon_hops_raw_object = acon_hops_construct(objs->asnk_hops_raw_object_count + 1, 
-                                                             objs->nMessages, 
-                                                             cfgs->msg_hops_raw_config);
-
-            objs->acon_hops_mapping_object = acon_hops_construct(objs->asnk_hops_mapping_object_count + 1, 
-                                                                 objs->nMessages,
-                                                                 cfgs->msg_hops_mapping_config);
-
-            objs->acon_hops_resample_object = acon_hops_construct(objs->asnk_hops_resample_object_count + 1, 
-                                                                  objs->nMessages, 
-                                                                  cfgs->msg_hops_resample_config);
-
-            objs->acon_spectra_stft_object = acon_spectra_construct(objs->asnk_spectra_stft_object_count + 1, 
-                                                                    objs->nMessages,
-                                                                    cfgs->msg_spectra_stft_config);
-
-            objs->acon_pots_ssl_object = acon_pots_construct(objs->asnk_pots_ssl_object_count + 1, 
-                                                             objs->nMessages,
-                                                             cfgs->msg_pots_ssl_config);
-
-            objs->acon_tracks_sst_object = acon_tracks_construct(objs->asnk_tracks_sst_object_count + 0, 
-                                                                 objs->nMessages, 
-                                                                 cfgs->msg_tracks_sst_config);
-/*
-            objs->acon_spectra_sss_object = acon_spectra_construct(objs->asnk_spectra_sss_object_count + 1, 
-                                                                   objs->nMessages, 
-                                                                   cfgs->msg_spectra_sss_config);
-
-            objs->acon_envs_sss_object = acon_envs_construct(1,
-                                                             objs->nMessages,
-                                                             cfgs->msg_envs_sss_config);
-
-            objs->acon_spectra_sspf_object = acon_spectra_construct(objs->asnk_spectra_sspf_object_count + 1, 
-                                                                    objs->nMessages, 
-                                                                    cfgs->msg_spectra_sspf_config);
-
-            objs->acon_hops_istft_object = acon_hops_construct(objs->asnk_hops_istft_object_count + 1,
-                                                               objs->nMessages,
-                                                               cfgs->msg_hops_istft_config);
-
-            objs->acon_hops_gain_object = acon_hops_construct(objs->asnk_hops_gain_object_count,
-                                                              objs->nMessages,
-                                                              cfgs->msg_hops_gain_config);
-*/
-            // +------------------------------------------------------+
-            // | Raw                                                  |
+            // | Raw                                                  |
             // +------------------------------------------------------+  
 
                 // +--------------------------------------------------+
                 // | Source                                           |
                 // +--------------------------------------------------+  
 
-                    asrc_hops_connect(objs->asrc_hops_raw_object, 
-                                      objs->acon_hops_raw_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_raw_object_count; iSink++) {
-                        
-                        asnk_hops_connect(objs->asnk_hops_raw_objects[iSink], 
-                                          objs->acon_hops_raw_object->outs[iSink + 1]);
-
-                    }
+                    asrc_hops_connect(objs->asrc_hops_mics_object, 
+                                      objs->acon_hops_mics_raw_object->in);
 
             // +------------------------------------------------------+
             // | Mapping                                              |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    amod_mapping_connect(objs->amod_mapping_object, 
-                                         objs->acon_hops_raw_object->outs[0], 
-                                         objs->acon_hops_mapping_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_mapping_object_count; iSink++) {
-
-                        asnk_hops_connect(objs->asnk_hops_mapping_objects[iSink],
-                                          objs->acon_hops_mapping_object->outs[iSink + 1]);
-
-                    }
+                    amod_mapping_connect(objs->amod_mapping_mics_object, 
+                                         objs->acon_hops_mics_raw_object->outs[0], 
+                                         objs->acon_hops_mics_map_object->in);
 
             // +------------------------------------------------------+
             // | Resample                                             |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    amod_resample_connect(objs->amod_resample_object, 
-                                          objs->acon_hops_mapping_object->outs[0], 
-                                          objs->acon_hops_resample_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_resample_object_count; iSink++) {
-
-                        asnk_hops_connect(objs->asnk_hops_resample_objects[iSink],
-                                          objs->acon_hops_resample_object->outs[iSink + 1]);
-
-                    }
+                    amod_resample_connect(objs->amod_resample_mics_object, 
+                                          objs->acon_hops_mics_map_object->outs[0], 
+                                          objs->acon_hops_mics_rs_object->in);
 
             // +------------------------------------------------------+
             // | STFT                                                 |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    amod_stft_connect(objs->amod_stft_object, 
-                                      objs->acon_hops_resample_object->outs[0], 
-                                      objs->acon_spectra_stft_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_stft_object_count; iSink++) {
-
-                        asnk_spectra_connect(objs->asnk_spectra_stft_objects[iSink],
-                                             objs->acon_spectra_stft_object->outs[iSink + 1]);
-
-                    }
+                    amod_stft_connect(objs->amod_stft_mics_object, 
+                                      objs->acon_hops_mics_rs_object->outs[0], 
+                                      objs->acon_spectra_mics_object->in);
 
             // +------------------------------------------------------+
             // | SSL                                                  |
                 // +--------------------------------------------------+  
 
                     amod_ssl_connect(objs->amod_ssl_object, 
-                                     objs->acon_spectra_stft_object->outs[0], 
+                                     objs->acon_spectra_mics_object->outs[0], 
                                      objs->acon_pots_ssl_object->in);
 
                 // +--------------------------------------------------+
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->asnk_pots_ssl_object_count; iSink++) {
-
-                        asnk_pots_connect(objs->asnk_pots_ssl_objects[iSink],
-                                          objs->acon_pots_ssl_object->outs[iSink + 1]);
-
-                    }
+                    asnk_pots_connect(objs->asnk_pots_ssl_object,
+                                      objs->acon_pots_ssl_object->outs[1]);
 
             // +------------------------------------------------------+
             // | SST                                                  |
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->asnk_tracks_sst_object_count; iSink++) {
-
-                        asnk_tracks_connect(objs->asnk_tracks_sst_objects[iSink],
-                                            objs->acon_tracks_sst_object->outs[iSink + 0]);
-
-                    }
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_sss_connect(objs->amod_sss_object,
-                                     objs->acon_spectra_stft_object->outs[1],
-                                     objs->acon_tracks_sst_object->outs[0],
-                                     objs->acon_spectra_sss_object->in,
-                                     objs->acon_envs_sss_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_sss_object_count; iSink++) {
-
-                        asnk_spectra_connect(objs->asnk_spectra_sss_objects[iSink],
-                                             objs->acon_spectra_sss_object->outs[iSink + 1]);
-
-                    }
-
-            // +------------------------------------------------------+
-            // | SSPF                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_sspf_connect(objs->amod_sspf_object,
-                                      objs->acon_spectra_sss_object->outs[0],
-                                      objs->acon_envs_sss_object->outs[0],
-                                      objs->acon_tracks_sst_object->outs[1],
-                                      objs->acon_spectra_sspf_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_sspf_object_count; iSink++) {
-
-                        asnk_spectra_connect(objs->asnk_spectra_sspf_objects[iSink],
-                                             objs->acon_spectra_sspf_object->outs[iSink + 1]);
-
-                    }           
-
-            // +------------------------------------------------------+
-            // | ISTFT                                                |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_istft_connect(objs->amod_istft_object,
-                                       objs->acon_spectra_sspf_object->outs[0],
-                                       objs->acon_hops_istft_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_istft_object_count; iSink++) {
-
-                        asnk_hops_connect(objs->asnk_hops_istft_objects[iSink],
-                                          objs->acon_hops_istft_object->outs[iSink + 1]);
-
-                    }    
-
-            // +------------------------------------------------------+
-            // | Gain                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_gain_connect(objs->amod_gain_object,
-                                      objs->acon_hops_istft_object->outs[0],
-                                      objs->acon_hops_gain_object->in);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_gain_object_count; iSink++) {
-
-                        asnk_hops_connect(objs->asnk_hops_gain_objects[iSink],
-                                          objs->acon_hops_gain_object->outs[iSink]);
+                    asnk_tracks_connect(objs->asnk_tracks_sst_object,
+                                        objs->acon_tracks_sst_object->outs[0]);
 
-                    }    
-*/
         return objs;
 
     }
                 // | Source                                           |
                 // +--------------------------------------------------+  
 
-                    asrc_hops_destroy(objs->asrc_hops_raw_object);
+                    asrc_hops_destroy(objs->asrc_hops_mics_object);
                     
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    amsg_hops_destroy(objs->amsg_hops_raw_object);
+                    amsg_hops_destroy(objs->amsg_hops_mics_raw_object);
                     
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_raw_object_count; iSink++) {
-
-                        asnk_hops_destroy(objs->asnk_hops_raw_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_hops_raw_objects);
-
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+  
 
-                    acon_hops_destroy(objs->acon_hops_raw_object);
+                    acon_hops_destroy(objs->acon_hops_mics_raw_object);
 
             // +------------------------------------------------------+
             // | Mapping                                              |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    amod_mapping_destroy(objs->amod_mapping_object);
+                    amod_mapping_destroy(objs->amod_mapping_mics_object);
                     
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    amsg_hops_destroy(objs->amsg_hops_mapping_object);
+                    amsg_hops_destroy(objs->amsg_hops_mics_map_object);
                     
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_mapping_object_count; iSink++) {
-
-                        asnk_hops_destroy(objs->asnk_hops_mapping_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_hops_mapping_objects);
-
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+  
 
-                    acon_hops_destroy(objs->acon_hops_mapping_object);             
+                    acon_hops_destroy(objs->acon_hops_mics_map_object);             
 
             // +------------------------------------------------------+
             // | Resample                                             |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    amod_resample_destroy(objs->amod_resample_object);
+                    amod_resample_destroy(objs->amod_resample_mics_object);
                     
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    amsg_hops_destroy(objs->amsg_hops_resample_object);
+                    amsg_hops_destroy(objs->amsg_hops_mics_rs_object);
                     
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_resample_object_count; iSink++) {
-
-                        asnk_hops_destroy(objs->asnk_hops_resample_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_hops_resample_objects);
-
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+  
 
-                    acon_hops_destroy(objs->acon_hops_resample_object);    
+                    acon_hops_destroy(objs->acon_hops_mics_rs_object);    
 
             // +------------------------------------------------------+
             // | STFT                                                 |
                 // | Module                                           |
                 // +--------------------------------------------------+  
 
-                    amod_stft_destroy(objs->amod_stft_object);
+                    amod_stft_destroy(objs->amod_stft_mics_object);
                     
                 // +--------------------------------------------------+
                 // | Message                                          |
                 // +--------------------------------------------------+  
 
-                    amsg_spectra_destroy(objs->amsg_spectra_stft_object);
+                    amsg_spectra_destroy(objs->amsg_spectra_mics_object);
                     
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_stft_object_count; iSink++) {
-
-                        asnk_spectra_destroy(objs->asnk_spectra_stft_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_spectra_stft_objects);
-
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+  
 
-                    acon_spectra_destroy(objs->acon_spectra_stft_object);   
+                    acon_spectra_destroy(objs->acon_spectra_mics_object);   
 
             // +------------------------------------------------------+
             // | SSL                                                  |
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->asnk_pots_ssl_object_count; iSink++) {
-
-                        asnk_pots_destroy(objs->asnk_pots_ssl_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_pots_ssl_objects);
+                    asnk_pots_destroy(objs->asnk_pots_ssl_object);
 
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // | Sinks                                            |
                 // +--------------------------------------------------+  
 
-                    for (iSink = 0; iSink < objs->asnk_tracks_sst_object_count; iSink++) {
-
-                        asnk_tracks_destroy(objs->asnk_tracks_sst_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_tracks_sst_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    acon_tracks_destroy(objs->acon_tracks_sst_object);   
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_sss_destroy(objs->amod_sss_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    amsg_spectra_destroy(objs->amsg_spectra_sss_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_sss_object_count; iSink++) {
-
-                        asnk_spectra_destroy(objs->asnk_spectra_sss_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_spectra_sss_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    acon_spectra_destroy(objs->acon_spectra_sss_object);   
-                    acon_envs_destroy(objs->acon_envs_sss_object);
-
-            // +------------------------------------------------------+
-            // | SSPF                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_sspf_destroy(objs->amod_sspf_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    amsg_spectra_destroy(objs->amsg_spectra_sspf_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_spectra_sspf_object_count; iSink++) {
-
-                        asnk_spectra_destroy(objs->asnk_spectra_sspf_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_spectra_sspf_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
-
-                    acon_spectra_destroy(objs->acon_spectra_sspf_object);   
-
-            // +------------------------------------------------------+
-            // | ISTFT                                                |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_istft_destroy(objs->amod_istft_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    amsg_hops_destroy(objs->amsg_hops_istft_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_istft_object_count; iSink++) {
-
-                        asnk_hops_destroy(objs->asnk_hops_istft_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_hops_istft_objects);
+                    asnk_tracks_destroy(objs->asnk_tracks_sst_object);
 
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+  
 
-                    acon_hops_destroy(objs->acon_hops_istft_object);  
-
-            // +------------------------------------------------------+
-            // | Gain                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    amod_gain_destroy(objs->amod_gain_object);
-                    
-                // +--------------------------------------------------+
-                // | Message                                          |
-                // +--------------------------------------------------+  
-
-                    amsg_hops_destroy(objs->amsg_hops_gain_object);
-                    
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+  
-
-                    for (iSink = 0; iSink < objs->asnk_hops_gain_object_count; iSink++) {
-
-                        asnk_hops_destroy(objs->asnk_hops_gain_objects[iSink]);
-
-                    }
-
-                    free((void *) objs->asnk_hops_gain_objects);
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+  
+                    acon_tracks_destroy(objs->acon_tracks_sst_object);  
 
-                    acon_hops_destroy(objs->acon_hops_gain_object);  
-*/
         free((void *) objs);
 
     }
\ No newline at end of file
index 5ccdc3a082b57ec25b99f7b116e9ca3510f360d2..93d580b3cfcd65c57faf42b57ffab7804f639526 100644 (file)
 
     typedef struct objects {
 
-        src_hops_obj * src_hops_raw_object;
-        msg_hops_obj * msg_hops_raw_object;        
-        unsigned int snk_hops_raw_object_count;
-        snk_hops_obj ** snk_hops_raw_objects;                
-        con_hops_obj * con_hops_raw_object; 
-
-        mod_mapping_obj * mod_mapping_object;
-        msg_hops_obj * msg_hops_mapping_object;
-        unsigned int snk_hops_mapping_object_count;
-        snk_hops_obj ** snk_hops_mapping_objects;
-        con_hops_obj * con_hops_mapping_object;              
-
-        mod_resample_obj * mod_resample_object;
-        msg_hops_obj * msg_hops_resample_object;
-        unsigned int snk_hops_resample_object_count;
-        snk_hops_obj ** snk_hops_resample_objects;
-        con_hops_obj * con_hops_resample_object;
-
-        mod_stft_obj * mod_stft_object;
-        msg_spectra_obj * msg_spectra_stft_object;
-        unsigned int snk_spectra_stft_object_count;
-        snk_spectra_obj ** snk_spectra_stft_objects;
-        con_spectra_obj * con_spectra_stft_object;
+        src_hops_obj * src_hops_mics_object;
+        msg_hops_obj * msg_hops_mics_raw_object;        
+        snk_hops_obj * snk_hops_mics_raw_object;                
+        con_hops_obj * con_hops_mics_raw_object; 
+
+        mod_mapping_obj * mod_mapping_mics_object;
+        msg_hops_obj * msg_hops_mics_map_object;
+        snk_hops_obj * snk_hops_mics_map_object;
+        con_hops_obj * con_hops_mics_map_object;              
+
+        mod_resample_obj * mod_resample_mics_object;
+        msg_hops_obj * msg_hops_mics_rs_object;
+        snk_hops_obj * snk_hops_mics_rs_object;
+        con_hops_obj * con_hops_mics_rs_object;
+
+        mod_stft_obj * mod_stft_mics_object;
+        msg_spectra_obj * msg_spectra_mics_object;
+        snk_spectra_obj * snk_spectra_mics_object;
+        con_spectra_obj * con_spectra_mics_object;
 
         mod_ssl_obj * mod_ssl_object;
         msg_pots_obj * msg_pots_ssl_object;
-        unsigned int snk_pots_ssl_object_count;
-        snk_pots_obj ** snk_pots_ssl_objects;
+        snk_pots_obj * snk_pots_ssl_object;
         con_pots_obj * con_pots_ssl_object;
 
         mod_sst_obj * mod_sst_object;
         msg_tracks_obj * msg_tracks_sst_object;
-        unsigned int snk_tracks_sst_object_count;
-        snk_tracks_obj ** snk_tracks_sst_objects;
+        snk_tracks_obj * snk_tracks_sst_object;
         con_tracks_obj * con_tracks_sst_object;
 
-        /*
-        mod_sss_obj * mod_sss_object;
-        msg_spectra_obj * msg_spectra_sss_object;
-        unsigned int snk_spectra_sss_object_count;
-        snk_spectra_obj ** snk_spectra_sss_objects;
-        con_spectra_obj * con_spectra_sss_object;
-        con_envs_obj * con_envs_sss_object;
-
-        mod_sspf_obj * mod_sspf_object;
-        msg_spectra_obj * msg_spectra_sspf_object;
-        unsigned int snk_spectra_sspf_object_count;
-        snk_spectra_obj ** snk_spectra_sspf_objects;
-        con_spectra_obj * con_spectra_sspf_object;
-
-        mod_istft_obj * mod_istft_object;
-        msg_hops_obj * msg_hops_istft_object;
-        unsigned int snk_hops_istft_object_count;
-        snk_hops_obj ** snk_hops_istft_objects;
-        con_hops_obj * con_hops_istft_object;
-
-        mod_gain_obj * mod_gain_object;
-        msg_hops_obj * msg_hops_gain_object;
-        unsigned int snk_hops_gain_object_count;
-        snk_hops_obj ** snk_hops_gain_objects;
-        con_hops_obj * con_hops_gain_object;
-        */
-
     } objects;   
 
     typedef struct aobjects {
       
         unsigned int nMessages;
 
-        asrc_hops_obj * asrc_hops_raw_object;
-        amsg_hops_obj * amsg_hops_raw_object;        
-        unsigned int asnk_hops_raw_object_count;
-        asnk_hops_obj ** asnk_hops_raw_objects;                
-        acon_hops_obj * acon_hops_raw_object; 
-
-        amod_mapping_obj * amod_mapping_object;
-        amsg_hops_obj * amsg_hops_mapping_object;
-        unsigned int asnk_hops_mapping_object_count;
-        asnk_hops_obj ** asnk_hops_mapping_objects;
-        acon_hops_obj * acon_hops_mapping_object;              
-
-        amod_resample_obj * amod_resample_object;
-        amsg_hops_obj * amsg_hops_resample_object;
-        unsigned int asnk_hops_resample_object_count;
-        asnk_hops_obj ** asnk_hops_resample_objects;
-        acon_hops_obj * acon_hops_resample_object;
-
-        amod_stft_obj * amod_stft_object;
-        amsg_spectra_obj * amsg_spectra_stft_object;
-        unsigned int asnk_spectra_stft_object_count;
-        asnk_spectra_obj ** asnk_spectra_stft_objects;
-        acon_spectra_obj * acon_spectra_stft_object;
+        asrc_hops_obj * asrc_hops_mics_object;
+        amsg_hops_obj * amsg_hops_mics_raw_object;
+        asnk_hops_obj * asnk_hops_mics_raw_object;
+        acon_hops_obj * acon_hops_mics_raw_object; 
+
+        amod_mapping_obj * amod_mapping_mics_object;
+        amsg_hops_obj * amsg_hops_mics_map_object;
+        asnk_hops_obj * asnk_hops_mics_map_objects;
+        acon_hops_obj * acon_hops_mics_map_object;              
+
+        amod_resample_obj * amod_resample_mics_object;
+        amsg_hops_obj * amsg_hops_mics_rs_object;
+        asnk_hops_obj * asnk_hops_mics_rs_object;
+        acon_hops_obj * acon_hops_mics_rs_object;
+
+        amod_stft_obj * amod_stft_mics_object;
+        amsg_spectra_obj * amsg_spectra_mics_object;
+        asnk_spectra_obj * asnk_spectra_mics_object;
+        acon_spectra_obj * acon_spectra_mics_object;
 
         amod_ssl_obj * amod_ssl_object;
         amsg_pots_obj * amsg_pots_ssl_object;
-        unsigned int asnk_pots_ssl_object_count;
-        asnk_pots_obj ** asnk_pots_ssl_objects;
+        asnk_pots_obj * asnk_pots_ssl_object;
         acon_pots_obj * acon_pots_ssl_object;
 
         amod_sst_obj * amod_sst_object;
         amsg_tracks_obj * amsg_tracks_sst_object;
-        unsigned int asnk_tracks_sst_object_count;
-        asnk_tracks_obj ** asnk_tracks_sst_objects;
+        asnk_tracks_obj * asnk_tracks_sst_object;
         acon_tracks_obj * acon_tracks_sst_object;
 
-        /*
-        amod_sss_obj * amod_sss_object;
-        amsg_spectra_obj * amsg_spectra_sss_object;
-        unsigned int asnk_spectra_sss_object_count;
-        asnk_spectra_obj ** asnk_spectra_sss_objects;
-        acon_spectra_obj * acon_spectra_sss_object;
-        acon_envs_obj * acon_envs_sss_object;
-
-        amod_sspf_obj * amod_sspf_object;
-        amsg_spectra_obj * amsg_spectra_sspf_object;
-        unsigned int asnk_spectra_sspf_object_count;
-        asnk_spectra_obj ** asnk_spectra_sspf_objects;
-        acon_spectra_obj * acon_spectra_sspf_object;
-
-        amod_istft_obj * amod_istft_object;
-        amsg_hops_obj * amsg_hops_istft_object;
-        unsigned int asnk_hops_istft_object_count;
-        asnk_hops_obj ** asnk_hops_istft_objects;
-        acon_hops_obj * acon_hops_istft_object;
-
-        amod_gain_obj * amod_gain_object;
-        amsg_hops_obj * amsg_hops_gain_object;
-        unsigned int asnk_hops_gain_object_count;
-        asnk_hops_obj ** asnk_hops_gain_objects;
-        acon_hops_obj * acon_hops_gain_object;    
-        */    
-
     } aobjects;
  
     objects * objects_construct(const configs * cfgs);
index e7c240cdd6405903daa33da2ea8fbd1fd9d6dde8..6a5587d497d8d1021e4d7d6fe1176a32269f4895 100644 (file)
 
     }
 
-    src_hops_cfg * parameters_src_hops_raw_config(const char * fileConfig, const char * fileIOs) {
+    src_hops_cfg * parameters_src_hops_mics_config(const char * fileConfig) {
 
         src_hops_cfg * cfg;
         char * tmpStr1;
 
         cfg = src_hops_cfg_construct();
 
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "raw.fS");
-
         // +----------------------------------------------------------+
         // | Format                                                   |
         // +----------------------------------------------------------+
 
-            tmpStr1 = parameters_lookup_string(fileIOs, "input.raw.format");
-
-            if (strcmp(tmpStr1, "bin08") == 0) { cfg->format = format_construct_bin(8); }
-            else if (strcmp(tmpStr1, "bin16") == 0) { cfg->format = format_construct_bin(16); }
-            else if (strcmp(tmpStr1, "bin24") == 0) { cfg->format = format_construct_bin(24); }
-            else if (strcmp(tmpStr1, "bin32") == 0) { cfg->format = format_construct_bin(32); }
-            else { printf("Sink hops raw: Invalid format\n"); exit(EXIT_FAILURE); }
+            tmpInt1 = parameters_lookup_int(fileConfig, "raw.nBits");
 
-            free((void *) tmpStr1);
+            if ((tmpInt1 == 8) || (tmpInt1 == 16) || (tmpInt1 == 24) || (tmpInt1 == 32)) {
+                cfg->format = format_construct_binary_int(tmpInt1);
+            }
+            else {
+                printf("raw.nBits: Invalid number of bits\n");
+                exit(EXIT_FAILURE);
+            }
 
         // +----------------------------------------------------------+
         // | Type                                                     |
         // +----------------------------------------------------------+
 
-            tmpStr1 = parameters_lookup_string(fileIOs, "input.raw.type");
+            tmpStr1 = parameters_lookup_string(fileConfig, "raw.interface.type");
 
             if (strcmp(tmpStr1, "file") == 0) { 
 
-                tmpStr2 = parameters_lookup_string(fileIOs, "input.raw.path");
+                tmpStr2 = parameters_lookup_string(fileConfig, "raw.interface.path");
 
                 cfg->interface = interface_construct_file(tmpStr2);
 
             }
             else if (strcmp(tmpStr1, "socket") == 0) { 
 
-                tmpStr2 = parameters_lookup_string(fileIOs, "input.raw.ip");
-                tmpInt1 = parameters_lookup_int(fileIOs, "input.raw.port");
+                tmpStr2 = parameters_lookup_string(fileConfig, "raw.interface.ip");
+                tmpInt1 = parameters_lookup_int(fileConfig, "raw.interface.port");
 
                 cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
 
             }
             else if (strcmp(tmpStr1, "soundcard") == 0) {
 
-                tmpInt1 = parameters_lookup_int(fileIOs, "input.raw.card");
-                tmpInt2 = parameters_lookup_int(fileIOs, "input.raw.device");
+                tmpInt1 = parameters_lookup_int(fileConfig, "raw.interface.card");
+                tmpInt2 = parameters_lookup_int(fileConfig, "raw.interface.device");
 
                 cfg->interface = interface_construct_soundcard(tmpInt1, tmpInt2);
 
             }
+            else {
+                printf("raw.interface.type: Invalid type\n");
+                exit(EXIT_FAILURE);
+            }
 
             free((void *) tmpStr1);
 
 
     }
 
-    msg_hops_cfg * parameters_msg_hops_raw_config(const char * fileConfig, const char * fileIOs) {
+    msg_hops_cfg * parameters_msg_hops_mics_raw_config(const char * fileConfig) {
 
         msg_hops_cfg * cfg;
 
 
     }
 
-    unsigned int parameters_snk_hops_raw_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.raw");
-
-    }
-
-    snk_hops_cfg * parameters_snk_hops_raw_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
-
-        snk_hops_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
-
-        cfg = snk_hops_cfg_construct();
-
-        // +------------------------------------------------------+
-        // | Sample rate                                          |
-        // +------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "raw.fS");
-
-        // +------------------------------------------------------+
-        // | Format                                               |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.raw.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "bin08") == 0) { cfg->format = format_construct_bin(8); }
-            else if (strcmp(tmpStr1, "bin16") == 0) { cfg->format = format_construct_bin(16); }
-            else if (strcmp(tmpStr1, "bin24") == 0) { cfg->format = format_construct_bin(24); }
-            else if (strcmp(tmpStr1, "bin32") == 0) { cfg->format = format_construct_bin(32); }
-            else { printf("Sink hops raw: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +------------------------------------------------------+
-        // | Type                                                 |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.raw.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.raw.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.raw.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.raw.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "soundcard") == 0) {
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.raw.[%u].device", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.raw.[%u].subdevice", iSink);                
-                tmpInt2 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_soundcard(tmpInt1, tmpInt2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }        
-
-            free((void *) tmpStr1);
-
-        return cfg;
-
-    }
 
-    mod_mapping_cfg * parameters_mod_mapping_config(const char * fileConfig, const char * fileIOs) {
+    mod_mapping_cfg * parameters_mod_mapping_mics_config(const char * fileConfig) {
 
         mod_mapping_cfg * cfg;
         unsigned int nLinks;
 
     }
 
-    msg_hops_cfg * parameters_msg_hops_mapping_config(const char * fileConfig, const char * fileIOs) {
+    msg_hops_cfg * parameters_msg_hops_mics_map_config(const char * fileConfig) {
 
         msg_hops_cfg * cfg;
 
 
     }
 
-    unsigned int parameters_snk_hops_mapping_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.mapping");
-
-    }
+    mod_resample_cfg * parameters_mod_resample_mics_config(const char * fileConfig) {
 
-    snk_hops_cfg * parameters_snk_hops_mapping_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
+        mod_resample_cfg * cfg;
 
-        snk_hops_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
         unsigned int tmpInt1;
         unsigned int tmpInt2;
 
-        cfg = snk_hops_cfg_construct();
-
-        // +------------------------------------------------------+
-        // | Sample rate                                          |
-        // +------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "raw.fS");
-
-        // +------------------------------------------------------+
-        // | Format                                               |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.mapping.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "bin08") == 0) { cfg->format = format_construct_bin(8); }
-            else if (strcmp(tmpStr1, "bin16") == 0) { cfg->format = format_construct_bin(16); }
-            else if (strcmp(tmpStr1, "bin24") == 0) { cfg->format = format_construct_bin(24); }
-            else if (strcmp(tmpStr1, "bin32") == 0) { cfg->format = format_construct_bin(32); }
-            else { printf("Sink hops mapping: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +------------------------------------------------------+
-        // | Type                                                 |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.mapping.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.mapping.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.mapping.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.mapping.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "soundcard") == 0) {
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.mapping.[%u].device", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.mapping.[%u].subdevice", iSink);                
-                tmpInt2 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_soundcard(tmpInt1, tmpInt2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }        
-
-            free((void *) tmpStr1);
-
-        return cfg;
-
-    }
-
-    mod_resample_cfg * parameters_mod_resample_config(const char * fileConfig, const char * fileIOs) {
-
-        mod_resample_cfg * cfg;
-
         cfg = mod_resample_cfg_construct();
 
-        unsigned int fSin;
-        unsigned int fSout;
-
         // +----------------------------------------------------------+
         // | Sample rates                                             |
         // +----------------------------------------------------------+
 
-            cfg->fSin = parameters_lookup_int(fileConfig, "raw.fS");        
-            cfg->fSout = parameters_lookup_int(fileConfig, "general.samplerate.mu");        
+            tmpInt1 = parameters_lookup_int(fileConfig, "raw.fS");        
+            tmpInt2 = parameters_lookup_int(fileConfig, "general.samplerate.mu");              
+
+            if (tmpInt1 < tmpInt2) {
+                printf("general.samplerate.mu: This sample rate must be smaller or equal to raw.fS");
+                exit(EXIT_FAILURE);
+            }
+
+            cfg->fSin = tmpInt1;
+            cfg->fSout = tmpInt2;
 
         return cfg;
 
     }
 
-    msg_hops_cfg * parameters_msg_hops_resample_config(const char * fileConfig, const char * fileIOs) {
+    msg_hops_cfg * parameters_msg_hops_mics_rs_config(const char * fileConfig) {
 
         msg_hops_cfg * cfg;
 
 
     }
 
-    unsigned int parameters_snk_hops_resample_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.resample");
-
-    }
-
-    snk_hops_cfg * parameters_snk_hops_resample_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
-
-        snk_hops_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
-
-        cfg = snk_hops_cfg_construct();
-
-        // +------------------------------------------------------+
-        // | Sample rate                                          |
-        // +------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-
-        // +------------------------------------------------------+
-        // | Format                                               |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.resample.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "bin08") == 0) { cfg->format = format_construct_bin(8); }
-            else if (strcmp(tmpStr1, "bin16") == 0) { cfg->format = format_construct_bin(16); }
-            else if (strcmp(tmpStr1, "bin24") == 0) { cfg->format = format_construct_bin(24); }
-            else if (strcmp(tmpStr1, "bin32") == 0) { cfg->format = format_construct_bin(32); }
-            else { printf("Sink hops resample: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +------------------------------------------------------+
-        // | Type                                                 |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.resample.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.resample.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.resample.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.resample.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "soundcard") == 0) {
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.resample.[%u].device", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.resample.[%u].subdevice", iSink);                
-                tmpInt2 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_soundcard(tmpInt1, tmpInt2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }        
-
-            free((void *) tmpStr1);
-
-        return cfg;
-
-    }
-
-    mod_stft_cfg * parameters_mod_stft_config(const char * fileConfig, const char * fileIOs) {
+    mod_stft_cfg * parameters_mod_stft_mics_config(const char * fileConfig) {
 
         mod_stft_cfg * cfg;
 
 
     }
 
-    msg_spectra_cfg * parameters_msg_spectra_stft_config(const char * fileConfig, const char * fileIOs) {
+    msg_spectra_cfg * parameters_msg_spectra_mics_config(const char * fileConfig) {
 
         msg_spectra_cfg * cfg;
 
 
     }
 
-    unsigned int parameters_snk_spectra_stft_count(const char * fileConfig, const char * fileIOs) {
+    mod_ssl_cfg * parameters_mod_ssl_config(const char * fileConfig) {
 
-        return parameters_count(fileIOs, "output.stft");
-
-    }
+        mod_ssl_cfg * cfg;
 
-    snk_spectra_cfg * parameters_snk_spectra_stft_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
+        unsigned int nChannels;
+        unsigned int iChannel;
+        unsigned int iSample;
+        unsigned int iLevel;
 
-        snk_spectra_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
         char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
 
-        cfg = snk_spectra_cfg_construct();
+        cfg = mod_ssl_cfg_construct();
 
         // +----------------------------------------------------------+
-        // | Sample rate                                              |
+        // | Number of channels                                       |
         // +----------------------------------------------------------+
 
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-
-        // +----------------------------------------------------------+
-        // | Format                                                   |
-        // +----------------------------------------------------------+
+            nChannels = parameters_count(fileConfig, "general.mics");
 
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.stft.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
+            cfg->mics = mics_construct_zero(nChannels);
 
-            if (strcmp(tmpStr1, "float") == 0) { cfg->format = format_construct_float(); }
-            else { printf("Sink spectra stft: Invalid format\n"); exit(EXIT_FAILURE); }
+            for (iChannel = 0; iChannel < nChannels; iChannel++) {
 
-            free((void *) tmpStr1);       
+                // +--------------------------------------------------+
+                // | Mu                                               |
+                // +--------------------------------------------------+
 
-        // +----------------------------------------------------------+
-        // | Type                                                     |
-        // +----------------------------------------------------------+
+                    for (iSample = 0; iSample < 3; iSample++) {
 
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.stft.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
+                        tmpLabel = (char *) malloc(sizeof(char) * 1024);
+                        sprintf(tmpLabel, "general.mics.[%u].mu.[%u]", iChannel, iSample);
+                        cfg->mics->mu[iChannel * 3 + iSample] = parameters_lookup_float(fileConfig, tmpLabel);
+                        free((void *) tmpLabel);
 
-            if (strcmp(tmpStr1, "file") == 0) { 
+                    }
 
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.stft.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
+                // +--------------------------------------------------+
+                // | Sigma2                                           |
+                // +--------------------------------------------------+
 
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.stft.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.stft.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }
-
-            free((void *) tmpStr1);
-
-        return cfg;
-
-    }
-
-    mod_ssl_cfg * parameters_mod_ssl_config(const char * fileConfig, const char * fileIOs) {
-
-        mod_ssl_cfg * cfg;
-
-        unsigned int nChannels;
-        unsigned int iChannel;
-        unsigned int iSample;
-        unsigned int iLevel;
-
-        char * tmpLabel;
-
-        cfg = mod_ssl_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            nChannels = parameters_count(fileConfig, "general.mics");
-
-            cfg->mics = mics_construct_zero(nChannels);
-
-            for (iChannel = 0; iChannel < nChannels; iChannel++) {
-
-                // +--------------------------------------------------+
-                // | Mu                                               |
-                // +--------------------------------------------------+
-
-                    for (iSample = 0; iSample < 3; iSample++) {
-
-                        tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                        sprintf(tmpLabel, "general.mics.[%u].mu.[%u]", iChannel, iSample);
-                        cfg->mics->mu[iChannel * 3 + iSample] = parameters_lookup_float(fileConfig, tmpLabel);
-                        free((void *) tmpLabel);
-
-                    }
-
-                // +--------------------------------------------------+
-                // | Sigma2                                           |
-                // +--------------------------------------------------+
-
-                    for (iSample = 0; iSample < 9; iSample++) {
+                    for (iSample = 0; iSample < 9; iSample++) {
 
                         tmpLabel = (char *) malloc(sizeof(char) * 1024);
                         sprintf(tmpLabel, "general.mics.[%u].sigma2.[%u]", iChannel, iSample);
         // | Number of thetas                                         |
         // +----------------------------------------------------------+
 
-            cfg->nThetas = parameters_lookup_int(fileConfig, "ssl.nThetas");
+            cfg->nThetas = parameters_lookup_int(fileConfig, "general.nThetas");
 
         // +----------------------------------------------------------+
         // | Number of thetas                                         |
         // +----------------------------------------------------------+
 
-            cfg->gainMin = parameters_lookup_float(fileConfig, "ssl.gainMin");
+            cfg->gainMin = parameters_lookup_float(fileConfig, "general.gainMin");
 
         // +----------------------------------------------------------+
         // | Spatial filter                                           |
 
     }
 
-    msg_pots_cfg * parameters_msg_pots_ssl_config(const char * fileConfig, const char * fileIOs) {
+    msg_pots_cfg * parameters_msg_pots_ssl_config(const char * fileConfig) {
 
         msg_pots_cfg * cfg;
 
 
     }
 
-    unsigned int parameters_snk_pots_ssl_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.ssl");
-
-    }
-
-    snk_pots_cfg * parameters_snk_pots_ssl_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
+    snk_pots_cfg * parameters_snk_pots_ssl_config(const char * fileConfig) {
 
         snk_pots_cfg * cfg;
         char * tmpStr1;
         // | Format                                                   |
         // +----------------------------------------------------------+
 
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.ssl.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
+            tmpStr1 = parameters_lookup_string(fileConfig, "ssl.potential.format");
 
-            if (strcmp(tmpStr1, "json") == 0) { cfg->format = format_construct_json(); }
-            else if (strcmp(tmpStr1, "float") == 0) { cfg->format = format_construct_float(); }
-            else { printf("Sink pots: Invalid format\n"); exit(EXIT_FAILURE); }
+            if (strcmp(tmpStr1, "json") == 0) { cfg->format = format_construct_text_json(); }
+            else if (strcmp(tmpStr1, "binary") == 0) { cfg->format = format_construct_binary_float(); }
+            else { printf("ssl.potential.format: Invalid format\n"); exit(EXIT_FAILURE); }
 
             free((void *) tmpStr1);       
 
         // | Type                                                     |
         // +----------------------------------------------------------+
 
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.ssl.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
+            tmpStr1 = parameters_lookup_string(fileConfig, "ssl.potential.interface.type");
 
-            if (strcmp(tmpStr1, "file") == 0) { 
+            if (strcmp(tmpStr1, "blackhole") == 0) {
 
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.ssl.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
+                cfg->interface = interface_construct_blackhole();
+
+            }
+            else if (strcmp(tmpStr1, "file") == 0) { 
 
+                tmpStr2 = parameters_lookup_string(fileConfig, "ssl.potential.interface.path");
                 cfg->interface = interface_construct_file(tmpStr2);
                 free((void *) tmpStr2);
 
             }
             else if (strcmp(tmpStr1, "socket") == 0) { 
 
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.ssl.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.ssl.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
+                tmpStr2 = parameters_lookup_string(fileConfig, "ssl.potential.interface.ip");
+                tmpInt1 = parameters_lookup_int(fileConfig, "ssl.potential.interface.port");
 
                 cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
                 free((void *) tmpStr2);
             }
             else {
 
-                printf("Invalid type\n");
+                printf("ssl.potential.interface.type: Invalid type\n");
                 exit(EXIT_FAILURE);
 
             }
 
     }
 
-    mod_sst_cfg * parameters_mod_sst_config(const char * fileConfig, const char * fileIOs) {
+    mod_sst_cfg * parameters_mod_sst_config(const char * fileConfig) {
 
         mod_sst_cfg * cfg;
 
                 cfg->mode = 'p';
             }
             else {
-                printf("Invalid filter type.\n");
+                printf("sst.mode: Invalid filter type.\n");
                 exit(EXIT_FAILURE);
             }
 
 
     }
 
-    msg_tracks_cfg * parameters_msg_tracks_sst_config(const char * fileConfig, const char * fileIOs) {
+    msg_tracks_cfg * parameters_msg_tracks_sst_config(const char * fileConfig) {
 
         msg_tracks_cfg * cfg;
 
 
     }
 
-    unsigned int parameters_snk_tracks_sst_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.sst");
-
-    }
-
-    snk_tracks_cfg * parameters_snk_tracks_sst_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
+    snk_tracks_cfg * parameters_snk_tracks_sst_config(const char * fileConfig) {
 
         snk_tracks_cfg * cfg;
         char * tmpStr1;
         // | Format                                                   |
         // +----------------------------------------------------------+
 
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.sst.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
+            tmpStr1 = parameters_lookup_string(fileConfig, "sst.tracked.format");
 
-            if (strcmp(tmpStr1, "json") == 0) { cfg->format = format_construct_json(); }
-            else if (strcmp(tmpStr1, "float") == 0) { cfg->format = format_construct_float(); }
-            else { printf("Sink tracks: Invalid format\n"); exit(EXIT_FAILURE); }
+            if (strcmp(tmpStr1, "json") == 0) { cfg->format = format_construct_text_json(); }
+            else if (strcmp(tmpStr1, "binary") == 0) { cfg->format = format_construct_binary_float(); }
+            else { printf("sst.tracked.format: Invalid format\n"); exit(EXIT_FAILURE); }
 
             free((void *) tmpStr1);       
 
         // | Type                                                     |
         // +----------------------------------------------------------+
 
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.sst.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
+            tmpStr1 = parameters_lookup_string(fileConfig, "sst.tracked.interface.type");
 
-            if (strcmp(tmpStr1, "file") == 0) { 
+            if (strcmp(tmpStr1, "blackhole") == 0) {
 
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sst.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
+                cfg->interface = interface_construct_blackhole();
+
+            }
+            else if (strcmp(tmpStr1, "file") == 0) { 
 
+                tmpStr2 = parameters_lookup_string(fileConfig, "sst.tracked.interface.path");
                 cfg->interface = interface_construct_file(tmpStr2);
                 free((void *) tmpStr2);
 
             }
             else if (strcmp(tmpStr1, "socket") == 0) { 
 
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sst.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sst.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
+                tmpStr2 = parameters_lookup_string(fileConfig, "sst.tracked.interface.ip");
+                tmpInt1 = parameters_lookup_int(fileConfig, "sst.tracked.interface.port");
 
                 cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
                 free((void *) tmpStr2);
 
                 cfg->interface = interface_construct_terminal();               
 
-            }            
+            }
             else {
 
-                printf("Invalid type\n");
+                printf("sst.tracked.interface.type: Invalid type\n");
                 exit(EXIT_FAILURE);
 
             }
 
     }
 
-    /*
-    mod_sss_cfg * parameters_mod_sss_config(const char * fileConfig, const char * fileIOs) {
-
-        mod_sss_cfg * cfg;
-
-        unsigned int nChannels;
-        unsigned int iChannel;
-        unsigned int iSample;
-        unsigned int iLevel;
-
-        char * tmpLabel;
-
-        cfg = mod_sss_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            nChannels = parameters_count(fileConfig, "general.mics");
-
-            cfg->mics = mics_construct_zero(nChannels);
-
-            for (iChannel = 0; iChannel < nChannels; iChannel++) {
-
-                // +--------------------------------------------------+
-                // | Mu                                               |
-                // +--------------------------------------------------+
-
-                    for (iSample = 0; iSample < 3; iSample++) {
-
-                        tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                        sprintf(tmpLabel, "general.mics.[%u].mu.[%u]", iChannel, iSample);
-                        cfg->mics->mu[iChannel * 3 + iSample] = parameters_lookup_float(fileConfig, tmpLabel);
-                        free((void *) tmpLabel);
-
-                    }
-
-                // +--------------------------------------------------+
-                // | Sigma2                                           |
-                // +--------------------------------------------------+
-
-                    for (iSample = 0; iSample < 9; iSample++) {
-
-                        tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                        sprintf(tmpLabel, "general.mics.[%u].sigma2.[%u]", iChannel, iSample);
-                        cfg->mics->sigma2[iChannel * 9 + iSample] = parameters_lookup_float(fileConfig, tmpLabel);
-                        free((void *) tmpLabel);
-
-                    }            
-
-                // +--------------------------------------------------+
-                // | Direction                                        |
-                // +--------------------------------------------------+
-
-                    for (iSample = 0; iSample < 3; iSample++) {
-
-                        tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                        sprintf(tmpLabel, "general.mics.[%u].direction.[%u]", iChannel, iSample);
-                        cfg->mics->direction[iChannel * 3 + iSample] = parameters_lookup_float(fileConfig, tmpLabel);
-                        free((void *) tmpLabel);
-
-                    } 
-
-                // +--------------------------------------------------+
-                // | Angle                                            |
-                // +--------------------------------------------------+
-
-                    tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                    sprintf(tmpLabel, "general.mics.[%u].angle.[%u]", iChannel, 0);
-                    cfg->mics->thetaAllPass[iChannel] = parameters_lookup_float(fileConfig, tmpLabel);
-                    free((void *) tmpLabel);
-
-                    tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                    sprintf(tmpLabel, "general.mics.[%u].angle.[%u]", iChannel, 1);
-                    cfg->mics->thetaNoPass[iChannel] = parameters_lookup_float(fileConfig, tmpLabel);
-                    free((void *) tmpLabel);
-
-            }
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->samplerate = samplerate_construct_zero();
-
-            cfg->samplerate->mu = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-            cfg->samplerate->sigma2 = parameters_lookup_float(fileConfig, "general.samplerate.sigma2");
-
-        // +----------------------------------------------------------+
-        // | Sound speed                                              |
-        // +----------------------------------------------------------+
-
-            cfg->soundspeed = soundspeed_construct_zero();
-
-            cfg->soundspeed->mu = parameters_lookup_float(fileConfig, "general.speedofsound.mu");
-            cfg->soundspeed->sigma2 = parameters_lookup_float(fileConfig, "general.speedofsound.sigma2");
-
-        // +----------------------------------------------------------+
-        // | Spatial filter                                           |
-        // +----------------------------------------------------------+
-
-            cfg->spatialfilter = spatialfilter_construct_zero();
-
-            cfg->spatialfilter->direction[0] = parameters_lookup_float(fileConfig, "general.spatialfilter.direction.[0]");
-            cfg->spatialfilter->direction[1] = parameters_lookup_float(fileConfig, "general.spatialfilter.direction.[1]");
-            cfg->spatialfilter->direction[2] = parameters_lookup_float(fileConfig, "general.spatialfilter.direction.[2]");
-            cfg->spatialfilter->thetaAllPass = parameters_lookup_float(fileConfig, "general.spatialfilter.angle.[0]");
-            cfg->spatialfilter->thetaNoPass = parameters_lookup_float(fileConfig, "general.spatialfilter.angle.[1]");
-
-        // +----------------------------------------------------------+
-        // | Directivity                                              |
-        // +----------------------------------------------------------+
-
-            cfg->nThetas = parameters_lookup_int(fileConfig, "sss.nThetas");
-            cfg->gainMin = parameters_lookup_float(fileConfig, "sss.gainMin");
-
-        return cfg;
-
-    }
-
-    msg_spectra_cfg * parameters_msg_spectra_sss_config(const char * fileConfig, const char * fileIOs) {
-
-        msg_spectra_cfg * cfg;
-
-        unsigned int halfFrameSize;
-        unsigned int nChannels;
-        unsigned int fS;
-
-        cfg = msg_spectra_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");        
-
-        // +----------------------------------------------------------+
-        // | Half Frame Size                                          |
-        // +----------------------------------------------------------+
-
-            cfg->halfFrameSize = parameters_lookup_int(fileConfig, "general.size.frameSize") / 2 + 1;
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            cfg->nChannels = parameters_count(fileConfig, "sst.N_inactive");
-
-        return cfg;
-
-
-    }
-
-    msg_envs_cfg * parameters_msg_envs_sss_config(const char * fileConfig, const char * fileIOs) {
-
-        msg_envs_cfg * cfg;
-
-        unsigned int halfFrameSize;
-        unsigned int nChannels;
-        unsigned int fS;
-
-        cfg = msg_envs_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");        
-
-        // +----------------------------------------------------------+
-        // | Half Frame Size                                          |
-        // +----------------------------------------------------------+
-
-            cfg->halfFrameSize = parameters_lookup_int(fileConfig, "general.size.frameSize") / 2 + 1;
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            cfg->nChannels = parameters_count(fileConfig, "sst.N_inactive");        
-
-        return cfg;
-
-    }
-
-    unsigned int parameters_snk_spectra_sss_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.sss");
-
-    }
-
-    snk_spectra_cfg * parameters_snk_spectra_sss_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
-
-        snk_spectra_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
-
-        cfg = snk_spectra_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-
-        // +----------------------------------------------------------+
-        // | Format                                                   |
-        // +----------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.sss.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "float") == 0) { cfg->format = format_construct_float(); }
-            else { printf("Sink spectra separation: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +----------------------------------------------------------+
-        // | Type                                                     |
-        // +----------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.sss.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sss.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sss.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sss.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }
-
-            free((void *) tmpStr1);
-
-        return cfg;
-
-    }
-
-    mod_sspf_cfg * parameters_mod_sspf_config(const char * fileConfig, const char * fileIOs) {
-
-        mod_sspf_cfg * cfg;
-
-        unsigned int nChannels;
-        unsigned int iChannel;
-        unsigned int iSample;
-        unsigned int iLevel;
-
-        char * tmpLabel;
-
-        cfg = mod_sspf_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | alpha                                                    |
-        // +----------------------------------------------------------+
-
-            cfg->alpha = parameters_lookup_float(fileConfig, "sspf.alpha");
-
-        // +----------------------------------------------------------+
-        // | beta                                                     |
-        // +----------------------------------------------------------+
-
-            cfg->beta = parameters_lookup_float(fileConfig, "sspf.beta");
-
-        // +----------------------------------------------------------+
-        // | Ginterf                                                  |
-        // +----------------------------------------------------------+
-
-            cfg->Ginterf = parameters_lookup_float(fileConfig, "sspf.Ginterf");
-
-        // +----------------------------------------------------------+
-        // | Epsilon                                                  |
-        // +----------------------------------------------------------+
-
-            cfg->epsilon = parameters_lookup_float(fileConfig, "general.epsilon");
-
-
-
-        return cfg;
-
-    }
-
-    msg_spectra_cfg * parameters_msg_spectra_sspf_config(const char * fileConfig, const char * fileIOs) {
-
-        msg_spectra_cfg * cfg;
-
-        unsigned int halfFrameSize;
-        unsigned int nChannels;
-        unsigned int fS;
-
-        cfg = msg_spectra_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");        
-
-        // +----------------------------------------------------------+
-        // | Hop size                                                 |
-        // +----------------------------------------------------------+
-
-            cfg->halfFrameSize = parameters_lookup_int(fileConfig, "general.size.frameSize") / 2 + 1;
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            cfg->nChannels = parameters_count(fileConfig, "sst.N_inactive");
-
-        return cfg;
-
-    }
-
-    unsigned int parameters_snk_spectra_sspf_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.sspf");
-
-    }
-
-    snk_spectra_cfg * parameters_snk_spectra_sspf_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
-
-        snk_spectra_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
-
-        cfg = snk_spectra_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-
-        // +----------------------------------------------------------+
-        // | Format                                                   |
-        // +----------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.sspf.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "float") == 0) { cfg->format = format_construct_float(); }
-            else { printf("Sink spectra postfilter: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +----------------------------------------------------------+
-        // | Type                                                     |
-        // +----------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.sspf.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sspf.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sspf.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.sspf.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }
-
-            free((void *) tmpStr1);
-
-        return cfg;
-
-    }
-
-    mod_istft_cfg * parameters_mod_istft_config(const char * fileConfig, const char * fileIOs) {
-
-        mod_istft_cfg * cfg;
-
-        cfg = mod_istft_cfg_construct();
-
-        return cfg;        
-
-    }
-
-    msg_hops_cfg * parameters_msg_hops_istft_config(const char * fileConfig, const char * fileIOs) {
-
-        msg_hops_cfg * cfg;
-
-        cfg = msg_hops_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");        
-
-        // +----------------------------------------------------------+
-        // | Hop size                                                 |
-        // +----------------------------------------------------------+
-
-            cfg->hopSize = parameters_lookup_int(fileConfig, "general.size.hopSize");
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            cfg->nChannels = parameters_count(fileConfig, "sst.N_inactive");
-
-        return cfg;        
-
-    }
-
-    unsigned int parameters_snk_hops_istft_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.istft");
-
-    }
-
-    snk_hops_cfg * parameters_snk_hops_istft_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
-
-        snk_hops_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
-
-        cfg = snk_hops_cfg_construct();
-
-        // +------------------------------------------------------+
-        // | Sample rate                                          |
-        // +------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-
-        // +------------------------------------------------------+
-        // | Format                                               |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.istft.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "bin08") == 0) { cfg->format = format_construct_bin(8); }
-            else if (strcmp(tmpStr1, "bin16") == 0) { cfg->format = format_construct_bin(16); }
-            else if (strcmp(tmpStr1, "bin24") == 0) { cfg->format = format_construct_bin(24); }
-            else if (strcmp(tmpStr1, "bin32") == 0) { cfg->format = format_construct_bin(32); }
-            else { printf("Sink hops ISTFT: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +------------------------------------------------------+
-        // | Type                                                 |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.istft.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.istft.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.istft.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.istft.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "soundcard") == 0) {
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.istft.[%u].device", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.istft.[%u].subdevice", iSink);                
-                tmpInt2 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_soundcard(tmpInt1, tmpInt2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }        
-
-            free((void *) tmpStr1);
-
-        return cfg;  
-
-    }   
-
-    mod_gain_cfg * parameters_mod_gain_config(const char * fileConfig, const char * fileIOs) {
-
-        mod_gain_cfg * cfg;
-
-        cfg = mod_gain_cfg_construct();
-
-        // +------------------------------------------------------+
-        // | Gain                                                 |
-        // +------------------------------------------------------+
-
-            cfg->gain = parameters_lookup_float(fileConfig, "playback.volume");
-
-        return cfg;     
-
-    }
-
-    msg_hops_cfg * parameters_msg_hops_gain_config(const char * fileConfig, const char * fileIOs) {
-
-        msg_hops_cfg * cfg;
-
-        cfg = msg_hops_cfg_construct();
-
-        // +----------------------------------------------------------+
-        // | Sample rate                                              |
-        // +----------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");        
-
-        // +----------------------------------------------------------+
-        // | Hop size                                                 |
-        // +----------------------------------------------------------+
-
-            cfg->hopSize = parameters_lookup_int(fileConfig, "general.size.hopSize");
-
-        // +----------------------------------------------------------+
-        // | Number of channels                                       |
-        // +----------------------------------------------------------+
-
-            cfg->nChannels = parameters_count(fileConfig, "sst.N_inactive");
-
-        return cfg;      
-
-    }
-
-    unsigned int parameters_snk_hops_gain_count(const char * fileConfig, const char * fileIOs) {
-
-        return parameters_count(fileIOs, "output.playback");
-
-    }
-
-    snk_hops_cfg * parameters_snk_hops_gain_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink) {
-
-        snk_hops_cfg * cfg;
-        char * tmpStr1;
-        char * tmpStr2;
-        char * tmpLabel;
-        unsigned int tmpInt1;
-        unsigned int tmpInt2;
-
-        cfg = snk_hops_cfg_construct();
-
-        // +------------------------------------------------------+
-        // | Sample rate                                          |
-        // +------------------------------------------------------+
-
-            cfg->fS = parameters_lookup_int(fileConfig, "general.samplerate.mu");
-
-        // +------------------------------------------------------+
-        // | Format                                               |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.playback.[%u].format", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "bin08") == 0) { cfg->format = format_construct_bin(8); }
-            else if (strcmp(tmpStr1, "bin16") == 0) { cfg->format = format_construct_bin(16); }
-            else if (strcmp(tmpStr1, "bin24") == 0) { cfg->format = format_construct_bin(24); }
-            else if (strcmp(tmpStr1, "bin32") == 0) { cfg->format = format_construct_bin(32); }
-            else { printf("Sink hops ISTFT: Invalid format\n"); exit(EXIT_FAILURE); }
-
-            free((void *) tmpStr1);       
-
-        // +------------------------------------------------------+
-        // | Type                                                 |
-        // +------------------------------------------------------+
-
-            tmpLabel = (char *) malloc(sizeof(char) * 1024);
-            sprintf(tmpLabel, "output.playback.[%u].type", iSink);
-            tmpStr1 = parameters_lookup_string(fileIOs, tmpLabel);
-            free((void *) tmpLabel);
-
-            if (strcmp(tmpStr1, "file") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.playback.[%u].path", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_file(tmpStr2);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "socket") == 0) { 
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.playback.[%u].ip", iSink);
-                tmpStr2 = parameters_lookup_string(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.playback.[%u].port", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_socket(tmpStr2, tmpInt1);
-                free((void *) tmpStr2);
-
-            }
-            else if (strcmp(tmpStr1, "soundcard") == 0) {
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.playback.[%u].device", iSink);
-                tmpInt1 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                tmpLabel = (char *) malloc(sizeof(char) * 1024);
-                sprintf(tmpLabel, "output.playback.[%u].subdevice", iSink);                
-                tmpInt2 = parameters_lookup_int(fileIOs, tmpLabel);
-                free((void *) tmpLabel);
-
-                cfg->interface = interface_construct_soundcard(tmpInt1, tmpInt2);
-
-            }
-            else {
-
-                printf("Invalid type\n");
-                exit(EXIT_FAILURE);
-
-            }        
-
-            free((void *) tmpStr1);
-
-        return cfg;  
-
-    }
-    */
\ No newline at end of file
+    
\ No newline at end of file
index 55b94858560857f95d9b6d3efcc94588736c560b..39a92add7b8f74ca521195a377924ce4254b8cde 100644 (file)
     unsigned int parameters_count(const char * file, const char * path);
 
 
-    src_hops_cfg * parameters_src_hops_raw_config(const char * fileConfig, const char * fileIOs);
+    src_hops_cfg * parameters_src_hops_mics_config(const char * fileConfig);
 
-    msg_hops_cfg * parameters_msg_hops_raw_config(const char * fileConfig, const char * fileIOs);
-    
-    unsigned int parameters_snk_hops_raw_count(const char * fileConfig, const char * fileIOs);
-
-    snk_hops_cfg * parameters_snk_hops_raw_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-
-
-    mod_mapping_cfg * parameters_mod_mapping_config(const char * fileConfig, const char * fileIOs);
-
-    msg_hops_cfg * parameters_msg_hops_mapping_config(const char * fileConfig, const char * fileIOs);
-
-    unsigned int parameters_snk_hops_mapping_count(const char * fileConfig, const char * fileIOs);
-
-    snk_hops_cfg * parameters_snk_hops_mapping_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-
-
-    mod_resample_cfg * parameters_mod_resample_config(const char * fileConfig, const char * fileIOs);
-
-    msg_hops_cfg * parameters_msg_hops_resample_config(const char * fileConfig, const char * fileIOs);
-
-    unsigned int parameters_snk_hops_resample_count(const char * fileConfig, const char * fileIOs);
-
-    snk_hops_cfg * parameters_snk_hops_resample_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-
-
-    mod_stft_cfg * parameters_mod_stft_config(const char * fileConfig, const char * fileIOs);
-
-    msg_spectra_cfg * parameters_msg_spectra_stft_config(const char * fileConfig, const char * fileIOs);
-
-    unsigned int parameters_snk_spectra_stft_count(const char * fileConfig, const char * fileIOs);
-
-    snk_spectra_cfg * parameters_snk_spectra_stft_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-
-
-    mod_ssl_cfg * parameters_mod_ssl_config(const char * fileConfig, const char * fileIOs);
-
-    msg_pots_cfg * parameters_msg_pots_ssl_config(const char * fileConfig, const char * fileIOs);
-
-    unsigned int parameters_snk_pots_ssl_count(const char * fileConfig, const char * fileIOs);
-
-    snk_pots_cfg * parameters_snk_pots_ssl_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-
-
-    mod_sst_cfg * parameters_mod_sst_config(const char * fileConfig, const char * fileIOs);
-
-    msg_tracks_cfg * parameters_msg_tracks_sst_config(const char * fileConfig, const char * fileIOs);
-
-    unsigned int parameters_snk_tracks_sst_count(const char * fileConfig, const char * fileIOs);
-
-    snk_tracks_cfg * parameters_snk_tracks_sst_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-
-
-    /*
-    mod_sss_cfg * parameters_mod_sss_config(const char * fileConfig, const char * fileIOs);
-
-    msg_spectra_cfg * parameters_msg_spectra_sss_config(const char * fileConfig, const char * fileIOs);
-
-    msg_envs_cfg * parameters_msg_envs_sss_config(const char * fileConfig, const char * fileIOs);
+    msg_hops_cfg * parameters_msg_hops_mics_raw_config(const char * fileConfig);
 
-    unsigned int parameters_snk_spectra_sss_count(const char * fileConfig, const char * fileIOs);
 
-    snk_spectra_cfg * parameters_snk_spectra_sss_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
+    mod_mapping_cfg * parameters_mod_mapping_mics_config(const char * fileConfig);
 
+    msg_hops_cfg * parameters_msg_hops_mics_map_config(const char * fileConfig);
 
-    mod_sspf_cfg * parameters_mod_sspf_config(const char * fileConfig, const char * fileIOs);
 
-    msg_spectra_cfg * parameters_msg_spectra_sspf_config(const char * fileConfig, const char * fileIOs);
+    mod_resample_cfg * parameters_mod_resample_mics_config(const char * fileConfig);
 
-    unsigned int parameters_snk_spectra_sspf_count(const char * fileConfig, const char * fileIOs);
+    msg_hops_cfg * parameters_msg_hops_mics_rs_config(const char * fileConfig);
 
-    snk_spectra_cfg * parameters_snk_spectra_sspf_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
 
+    mod_stft_cfg * parameters_mod_stft_mics_config(const char * fileConfig);
 
-    mod_istft_cfg * parameters_mod_istft_config(const char * fileConfig, const char * fileIOs);
+    msg_spectra_cfg * parameters_msg_spectra_mics_config(const char * fileConfig);
 
-    msg_hops_cfg * parameters_msg_hops_istft_config(const char * fileConfig, const char * fileIOs);
 
-    unsigned int parameters_snk_hops_istft_count(const char * fileConfig, const char * fileIOs);
+    mod_ssl_cfg * parameters_mod_ssl_config(const char * fileConfig);
 
-    snk_hops_cfg * parameters_snk_hops_istft_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
+    msg_pots_cfg * parameters_msg_pots_ssl_config(const char * fileConfig);
 
+    snk_pots_cfg * parameters_snk_pots_ssl_config(const char * fileConfig);
 
-    mod_gain_cfg * parameters_mod_gain_config(const char * fileConfig, const char * fileIOs);
 
-    msg_hops_cfg * parameters_msg_hops_gain_config(const char * fileConfig, const char * fileIOs);
+    mod_sst_cfg * parameters_mod_sst_config(const char * fileConfig);
 
-    unsigned int parameters_snk_hops_gain_count(const char * fileConfig, const char * fileIOs);
+    msg_tracks_cfg * parameters_msg_tracks_sst_config(const char * fileConfig);
 
-    snk_hops_cfg * parameters_snk_hops_gain_config(const char * fileConfig, const char * fileIOs, const unsigned int iSink);
-    */
+    snk_tracks_cfg * parameters_snk_tracks_sst_config(const char * fileConfig);
 
 #endif
\ No newline at end of file
index d94534c138c3147031aa82e6b3ee8f4561f9acbe..80c0151caebc22247f9eec82e0ceee1dc86ab572 100644 (file)
@@ -9,21 +9,17 @@
 
         prf->duration = 0.0f;
 
-        prf->src_hops_raw_prf = 0.0f;
-        prf->con_hops_raw_prf = 0.0f;
-        prf->snk_hops_raw_prf = 0.0f;
+        prf->src_hops_mics_prf = 0.0f;
+        prf->con_hops_mics_raw_prf = 0.0f;
 
-        prf->mod_mapping_prf = 0.0f;
-        prf->con_hops_mapping_prf = 0.0f;
-        prf->snk_hops_mapping_prf = 0.0f;
+        prf->mod_mapping_mics_prf = 0.0f;
+        prf->con_hops_mics_map_prf = 0.0f;
 
-        prf->mod_resample_prf = 0.0f;
-        prf->con_hops_resample_prf = 0.0f;
-        prf->snk_hops_resample_prf = 0.0f;
+        prf->mod_resample_mics_prf = 0.0f;
+        prf->con_hops_mics_rs_prf = 0.0f;
 
-        prf->mod_stft_prf = 0.0f;
-        prf->con_spectra_stft_prf = 0.0f;
-        prf->snk_spectra_stft_prf = 0.0f;
+        prf->mod_stft_mics_prf = 0.0f;
+        prf->con_spectra_mics_prf = 0.0f;
 
         prf->mod_ssl_prf = 0.0f;
         prf->con_pots_ssl_prf = 0.0f;
         prf->con_tracks_sst_prf = 0.0f;
         prf->snk_tracks_sst_prf = 0.0f;
 
-        prf->mod_sss_prf = 0.0f;
-        prf->con_spectra_sss_prf = 0.0f;
-        prf->con_envs_sss_prf = 0.0f;
-        prf->snk_spectra_sss_prf = 0.0f;
-
-        prf->mod_sspf_prf = 0.0f;
-        prf->con_spectra_sspf_prf = 0.0f;
-        prf->snk_spectra_sspf_prf = 0.0f;
-
-        prf->mod_istft_prf = 0.0f;
-        prf->con_hops_istft_prf = 0.0f;
-        prf->snk_hops_istft_prf = 0.0f;
-
-        prf->mod_gain_prf = 0.0f;
-        prf->con_hops_gain_prf = 0.0f;
-        prf->snk_hops_gain_prf = 0.0f;
-
         return prf;
 
     }
         float source, sink, module, connector;
         float total;
 
-        source = prf->src_hops_raw_prf;
-
-        sink = prf->snk_hops_raw_prf + 
-               prf->snk_hops_mapping_prf + 
-               prf->snk_hops_resample_prf + 
-               prf->snk_spectra_stft_prf +
-               prf->snk_pots_ssl_prf +
-               prf->snk_tracks_sst_prf +
-               prf->snk_spectra_sss_prf +
-               prf->snk_spectra_sspf_prf +
-               prf->snk_hops_istft_prf +
-               prf->snk_hops_gain_prf;
-
-        module = prf->mod_mapping_prf + 
-                 prf->mod_resample_prf +
-                 prf->mod_stft_prf +
+        source = prf->src_hops_mics_prf;
+
+        sink = prf->snk_pots_ssl_prf +
+               prf->snk_tracks_sst_prf;
+
+        module = prf->mod_mapping_mics_prf + 
+                 prf->mod_resample_mics_prf +
+                 prf->mod_stft_mics_prf +
                  prf->mod_ssl_prf +
-                 prf->mod_sst_prf +
-                 prf->mod_sss_prf +
-                 prf->mod_sspf_prf +
-                 prf->mod_istft_prf +
-                 prf->mod_gain_prf;
-
-        connector = prf->con_hops_raw_prf +
-                    prf->con_hops_mapping_prf +
-                    prf->con_hops_resample_prf +
-                    prf->con_spectra_stft_prf +
+                 prf->mod_sst_prf;
+
+        connector = prf->con_hops_mics_raw_prf +
+                    prf->con_hops_mics_map_prf +
+                    prf->con_hops_mics_rs_prf +
+                    prf->con_spectra_mics_prf +
                     prf->con_pots_ssl_prf +
-                    prf->con_tracks_sst_prf +
-                    prf->con_spectra_sss_prf +
-                    prf->con_envs_sss_prf + 
-                    prf->con_spectra_sspf_prf +
-                    prf->con_hops_istft_prf + 
-                    prf->con_hops_gain_prf;
+                    prf->con_tracks_sst_prf;
 
         total = source + sink + module + connector;                    
 
         printf("|              Profiler summary              |\n");
         printf("+--------------------------------------------+\n");
         printf("| + Raw                                      |\n");
-        printf("|    - Source.......... %07.3f (%06.2f%%)    |\n",prf->src_hops_raw_prf,roundf(10000.0f * prf->src_hops_raw_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_raw_prf,roundf(10000.0f * prf->con_hops_raw_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_hops_raw_prf,roundf(10000.0f * prf->snk_hops_raw_prf / prf->duration) / 100.0f);
+        printf("|    - Source.......... %07.3f (%06.2f%%)    |\n",prf->src_hops_mics_prf,roundf(10000.0f * prf->src_hops_mics_prf / prf->duration) / 100.0f);
+        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_mics_raw_prf,roundf(10000.0f * prf->con_hops_mics_raw_prf / prf->duration) / 100.0f);
         printf("| + Mapping                                  |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_mapping_prf,roundf(10000.0f * prf->mod_mapping_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_mapping_prf,roundf(10000.0f * prf->con_hops_mapping_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_hops_mapping_prf,roundf(10000.0f * prf->snk_hops_mapping_prf / prf->duration) / 100.0f);
+        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_mapping_mics_prf,roundf(10000.0f * prf->mod_mapping_mics_prf / prf->duration) / 100.0f);
+        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_mics_map_prf,roundf(10000.0f * prf->con_hops_mics_map_prf / prf->duration) / 100.0f);
         printf("| + Resample                                 |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_resample_prf,roundf(10000.0f * prf->mod_resample_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_resample_prf,roundf(10000.0f * prf->con_hops_resample_prf / prf->duration));
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_hops_resample_prf,roundf(10000.0f * prf->snk_hops_resample_prf / prf->duration));
+        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_resample_mics_prf,roundf(10000.0f * prf->mod_resample_mics_prf / prf->duration) / 100.0f);
+        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_mics_rs_prf,roundf(10000.0f * prf->con_hops_mics_rs_prf / prf->duration));
         printf("| + STFT                                     |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_stft_prf,roundf(10000.0f * prf->mod_stft_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_spectra_stft_prf,roundf(10000.0f * prf->con_spectra_stft_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_spectra_stft_prf,roundf(10000.0f * prf->snk_spectra_stft_prf / prf->duration) / 100.0f);        
+        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_stft_mics_prf,roundf(10000.0f * prf->mod_stft_mics_prf / prf->duration) / 100.0f);
+        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_spectra_mics_prf,roundf(10000.0f * prf->con_spectra_mics_prf / prf->duration) / 100.0f);
         printf("| + SSL                                      |\n");
         printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_ssl_prf,roundf(10000.0f * prf->mod_ssl_prf / prf->duration) / 100.0f);
         printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_pots_ssl_prf,roundf(10000.0f * prf->con_pots_ssl_prf / prf->duration) / 100.0f);
         printf("| + SST                                      |\n");
         printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_sst_prf,roundf(10000.0f * prf->mod_sst_prf / prf->duration) / 100.0f);
         printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_tracks_sst_prf,roundf(10000.0f * prf->con_tracks_sst_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_tracks_sst_prf,roundf(10000.0f * prf->snk_tracks_sst_prf / prf->duration) / 100.0f);  
-/*        printf("| + SSS                                      |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_sss_prf,roundf(10000.0f * prf->mod_sss_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_spectra_sss_prf,roundf(10000.0f * prf->con_spectra_sss_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_spectra_sss_prf,roundf(10000.0f * prf->snk_spectra_sss_prf / prf->duration) / 100.0f);  
-        printf("| + SSPF                                     |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_sspf_prf,roundf(10000.0f * prf->mod_sspf_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_spectra_sspf_prf,roundf(10000.0f * prf->con_spectra_sspf_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_spectra_sspf_prf,roundf(10000.0f * prf->snk_spectra_sspf_prf / prf->duration) / 100.0f); 
-        printf("| + ISTFT                                    |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_istft_prf,roundf(10000.0f * prf->mod_istft_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_istft_prf,roundf(10000.0f * prf->con_hops_istft_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_hops_istft_prf,roundf(10000.0f * prf->snk_hops_istft_prf / prf->duration) / 100.0f);      
-        printf("| + Playback                                 |\n");
-        printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",prf->mod_gain_prf,roundf(10000.0f * prf->mod_gain_prf / prf->duration) / 100.0f);
-        printf("|    - Connector....... %07.3f (%06.2f%%)    |\n",prf->con_hops_gain_prf,roundf(10000.0f * prf->con_hops_gain_prf / prf->duration) / 100.0f);
-        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_hops_gain_prf,roundf(10000.0f * prf->snk_hops_gain_prf / prf->duration) / 100.0f);*/            
+        printf("|    - Sink............ %07.3f (%06.2f%%)    |\n",prf->snk_tracks_sst_prf,roundf(10000.0f * prf->snk_tracks_sst_prf / prf->duration) / 100.0f);         
         printf("+--------------------------------------------+\n");
         printf("| + TOTAL.............. %07.3f (%06.2f%%)    |\n",total,roundf(10000.0f * total / prf->duration) / 100.0f);
         printf("|    - Module.......... %07.3f (%06.2f%%)    |\n",module,roundf(10000.0f * module / prf->duration) / 100.0f);
index b273aa198f94c48638baf60362c4d8790363e638..9c03933f09ffe6d5429d04608dba416e2dcba2f5 100644 (file)
@@ -9,21 +9,17 @@
 
         float duration;
 
-        float src_hops_raw_prf;
-        float con_hops_raw_prf;
-        float snk_hops_raw_prf;
+        float src_hops_mics_prf;
+        float con_hops_mics_raw_prf;
 
-        float mod_mapping_prf;
-        float con_hops_mapping_prf;
-        float snk_hops_mapping_prf;
+        float mod_mapping_mics_prf;
+        float con_hops_mics_map_prf;
 
-        float mod_resample_prf;
-        float con_hops_resample_prf;
-        float snk_hops_resample_prf;
+        float mod_resample_mics_prf;
+        float con_hops_mics_rs_prf;
 
-        float mod_stft_prf;
-        float con_spectra_stft_prf;
-        float snk_spectra_stft_prf;
+        float mod_stft_mics_prf;
+        float con_spectra_mics_prf;
 
         float mod_ssl_prf;
         float con_pots_ssl_prf;
         float con_tracks_sst_prf;
         float snk_tracks_sst_prf;
 
-        float mod_sss_prf;
-        float con_spectra_sss_prf;
-        float con_envs_sss_prf;
-        float snk_spectra_sss_prf;
-
-        float mod_sspf_prf;
-        float con_spectra_sspf_prf;
-        float snk_spectra_sspf_prf;
-
-        float mod_istft_prf;
-        float con_hops_istft_prf;
-        float snk_hops_istft_prf;
-
-        float mod_gain_prf;
-        float con_hops_gain_prf;
-        float snk_hops_gain_prf;
-
     } profiler;
 
     profiler * profiler_construct(void);
index 2fbbee5e968f3f6a3a719f568562b092c73d6d0f..efc934ce4585c0e703b2e96ed5917a812152e20c 100644 (file)
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                thread_start(aobjs->asrc_hops_raw_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_hops_raw_object_count; iSink++) {
-                    thread_start(aobjs->asnk_hops_raw_objects[iSink]->thread);
-                }
+                thread_start(aobjs->asrc_hops_mics_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+                     
 
-                thread_start(aobjs->acon_hops_raw_object->thread);
+                thread_start(aobjs->acon_hops_mics_raw_object->thread);
 
         // +----------------------------------------------------------+
         // | Mapping                                                  |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                thread_start(aobjs->amod_mapping_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_hops_mapping_object_count; iSink++) {
-                    thread_start(aobjs->asnk_hops_mapping_objects[iSink]->thread);
-                }
+                thread_start(aobjs->amod_mapping_mics_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+                     
 
-                thread_start(aobjs->acon_hops_mapping_object->thread);
+                thread_start(aobjs->acon_hops_mics_map_object->thread);
 
         // +----------------------------------------------------------+
         // | Resample                                                 |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                thread_start(aobjs->amod_resample_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_hops_resample_object_count; iSink++) {
-                    thread_start(aobjs->asnk_hops_resample_objects[iSink]->thread);
-                }
+                thread_start(aobjs->amod_resample_mics_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+                     
 
-                thread_start(aobjs->acon_hops_resample_object->thread);
+                thread_start(aobjs->acon_hops_mics_rs_object->thread);
 
         // +----------------------------------------------------------+
         // | STFT                                                     |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                thread_start(aobjs->amod_stft_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_spectra_stft_object_count; iSink++) {
-                    thread_start(aobjs->asnk_spectra_stft_objects[iSink]->thread);
-                }
+                thread_start(aobjs->amod_stft_mics_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+                     
 
-                thread_start(aobjs->acon_spectra_stft_object->thread);
+                thread_start(aobjs->acon_spectra_mics_object->thread);
 
         // +----------------------------------------------------------+
         // | SSL                                                      |
             // | Sinks                                                |
             // +------------------------------------------------------+                      
 
-                for (iSink = 0; iSink < aobjs->asnk_pots_ssl_object_count; iSink++) {
-                    thread_start(aobjs->asnk_pots_ssl_objects[iSink]->thread);
-                }
+                thread_start(aobjs->asnk_pots_ssl_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // | Sinks                                                |
             // +------------------------------------------------------+                      
 
-                for (iSink = 0; iSink < aobjs->asnk_tracks_sst_object_count; iSink++) {
-                    thread_start(aobjs->asnk_tracks_sst_objects[iSink]->thread);
-                }
+                thread_start(aobjs->asnk_tracks_sst_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+                     
 
                 thread_start(aobjs->acon_tracks_sst_object->thread);
-/*
-        // +----------------------------------------------------------+
-        // | SSS                                                      |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_start(aobjs->amod_sss_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_spectra_sss_object_count; iSink++) {
-                    thread_start(aobjs->asnk_spectra_sss_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+                     
-
-                thread_start(aobjs->acon_spectra_sss_object->thread);
-                thread_start(aobjs->acon_envs_sss_object->thread);
-
-        // +----------------------------------------------------------+
-        // | SSPF                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_start(aobjs->amod_sspf_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_spectra_sspf_object_count; iSink++) {
-                    thread_start(aobjs->asnk_spectra_sspf_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+                     
-
-                thread_start(aobjs->acon_spectra_sspf_object->thread);
 
-        // +----------------------------------------------------------+
-        // | ISTFT                                                    |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_start(aobjs->amod_istft_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_hops_istft_object_count; iSink++) {
-                    thread_start(aobjs->asnk_hops_istft_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+                     
-
-                thread_start(aobjs->acon_hops_istft_object->thread);
-
-        // +----------------------------------------------------------+
-        // | Gain                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_start(aobjs->amod_gain_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < aobjs->asnk_hops_gain_object_count; iSink++) {
-                    thread_start(aobjs->asnk_hops_gain_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+                     
-
-                thread_start(aobjs->acon_hops_gain_object->thread);
-*/
     }
 
     void threads_multiple_stop(aobjects * aobjs) {
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                thread_stop(aobjs->asrc_hops_raw_object->thread);
+                thread_stop(aobjs->asrc_hops_mics_object->thread);
 
                 // Stops the source that generate frames to process.
                 // This will generate a "zero" message that will stop
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->asrc_hops_raw_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_hops_raw_object_count; iSink++) {
-                    thread_join(aobjs->asnk_hops_raw_objects[iSink]->thread);
-                }
+                thread_join(aobjs->asrc_hops_mics_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->acon_hops_raw_object->thread);
+                thread_join(aobjs->acon_hops_mics_raw_object->thread);
 
         // +----------------------------------------------------------+
         // | Mapping                                                  |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->amod_mapping_object->thread);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_hops_mapping_object_count; iSink++) {
-                    thread_join(aobjs->asnk_hops_mapping_objects[iSink]->thread);
-                }
+                thread_join(aobjs->amod_mapping_mics_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->acon_hops_mapping_object->thread);
+                thread_join(aobjs->acon_hops_mics_map_object->thread);
 
         // +----------------------------------------------------------+
         // | Resample                                                 |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->amod_resample_object->thread);               
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_hops_resample_object_count; iSink++) {
-                    thread_join(aobjs->asnk_hops_resample_objects[iSink]->thread);
-                }
+                thread_join(aobjs->amod_resample_mics_object->thread);               
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->acon_hops_resample_object->thread);
+                thread_join(aobjs->acon_hops_mics_rs_object->thread);
 
         // +----------------------------------------------------------+
         // | STFT                                                     |
             // | Module                                               |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->amod_stft_object->thread);               
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_spectra_stft_object_count; iSink++) {
-                    thread_join(aobjs->asnk_spectra_stft_objects[iSink]->thread);
-                }
+                thread_join(aobjs->amod_stft_mics_object->thread);               
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+  
 
-                thread_join(aobjs->acon_spectra_stft_object->thread);
+                thread_join(aobjs->acon_spectra_mics_object->thread);
 
         // +----------------------------------------------------------+
         // | SSL                                                      |
             // | Sinks                                                |
             // +------------------------------------------------------+   
                 
-                for (iSink = 0; iSink < aobjs->asnk_pots_ssl_object_count; iSink++) {
-                    thread_join(aobjs->asnk_pots_ssl_objects[iSink]->thread);
-                }
+                thread_join(aobjs->asnk_pots_ssl_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // | Sinks                                                |
             // +------------------------------------------------------+   
                 
-                for (iSink = 0; iSink < aobjs->asnk_tracks_sst_object_count; iSink++) {
-                    thread_join(aobjs->asnk_tracks_sst_objects[iSink]->thread);
-                }
+                thread_join(aobjs->asnk_tracks_sst_object->thread);
 
             // +------------------------------------------------------+
             // | Connector                                            |
             // +------------------------------------------------------+  
 
                 thread_join(aobjs->acon_tracks_sst_object->thread);
-/*
-        // +----------------------------------------------------------+
-        // | SSS                                                      |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->amod_sss_object->thread);               
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_spectra_sss_object_count; iSink++) {
-                    thread_join(aobjs->asnk_spectra_sss_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->acon_spectra_sss_object->thread);
-                thread_join(aobjs->acon_envs_sss_object->thread);
-
-        // +----------------------------------------------------------+
-        // | SSPF                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->amod_sspf_object->thread);               
 
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_spectra_sspf_object_count; iSink++) {
-                    thread_join(aobjs->asnk_spectra_sspf_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->acon_spectra_sspf_object->thread);
-
-        // +----------------------------------------------------------+
-        // | ISTFT                                                    |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->amod_istft_object->thread);               
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_hops_istft_object_count; iSink++) {
-                    thread_join(aobjs->asnk_hops_istft_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->acon_hops_istft_object->thread);
-
-        // +----------------------------------------------------------+
-        // | Gain                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Module                                               |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->amod_gain_object->thread);               
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+   
-                
-                for (iSink = 0; iSink < aobjs->asnk_hops_gain_object_count; iSink++) {
-                    thread_join(aobjs->asnk_hops_gain_objects[iSink]->thread);
-                }
-
-            // +------------------------------------------------------+
-            // | Connector                                            |
-            // +------------------------------------------------------+  
-
-                thread_join(aobjs->acon_hops_gain_object->thread);
-*/
     }
 
     void threads_single_open(objects * objs) {
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                src_hops_open(objs->src_hops_raw_object);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_raw_object_count; iSink++) {
-                    snk_hops_open(objs->snk_hops_raw_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | Mapping                                                  |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_mapping_object_count; iSink++) {
-                    snk_hops_open(objs->snk_hops_mapping_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | Resample                                                 |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_resample_object_count; iSink++) {
-                    snk_hops_open(objs->snk_hops_resample_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | STFT                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_spectra_stft_object_count; iSink++) {
-                    snk_spectra_open(objs->snk_spectra_stft_objects[iSink]);
-                }
+                src_hops_open(objs->src_hops_mics_object);
 
         // +----------------------------------------------------------+
         // | SSL                                                      |
             // | Sinks                                                |
             // +------------------------------------------------------+                      
 
-                for (iSink = 0; iSink < objs->snk_pots_ssl_object_count; iSink++) {
-                    snk_pots_open(objs->snk_pots_ssl_objects[iSink]);
-                }
+                snk_pots_open(objs->snk_pots_ssl_object);
 
         // +----------------------------------------------------------+
         // | SST                                                      |
             // | Sinks                                                |
             // +------------------------------------------------------+                      
 
-                for (iSink = 0; iSink < objs->snk_tracks_sst_object_count; iSink++) {
-                    snk_tracks_open(objs->snk_tracks_sst_objects[iSink]);
-                }
-/*
-        // +----------------------------------------------------------+
-        // | SSS                                                      |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_spectra_sss_object_count; iSink++) {
-                    snk_spectra_open(objs->snk_spectra_sss_objects[iSink]);
-                }
+                snk_tracks_open(objs->snk_tracks_sst_object);
 
-        // +----------------------------------------------------------+
-        // | SSPF                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_spectra_sspf_object_count; iSink++) {
-                    snk_spectra_open(objs->snk_spectra_sspf_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | ISTFT                                                    |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_istft_object_count; iSink++) {
-                    snk_hops_open(objs->snk_hops_istft_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | Gain                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_gain_object_count; iSink++) {
-                    snk_hops_open(objs->snk_hops_gain_objects[iSink]);
-                }
-*/
     }
 
     void threads_single_close(objects * objs) {
             // | Source                                               |
             // +------------------------------------------------------+  
 
-                src_hops_close(objs->src_hops_raw_object);
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_raw_object_count; iSink++) {
-                    snk_hops_close(objs->snk_hops_raw_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | Mapping                                                  |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_mapping_object_count; iSink++) {
-                    snk_hops_close(objs->snk_hops_mapping_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | Resample                                                 |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_resample_object_count; iSink++) {
-                    snk_hops_close(objs->snk_hops_resample_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | STFT                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_spectra_stft_object_count; iSink++) {
-                    snk_spectra_close(objs->snk_spectra_stft_objects[iSink]);
-                }
+                src_hops_close(objs->src_hops_mics_object);
 
         // +----------------------------------------------------------+
         // | SSL                                                      |
             // | Sinks                                                |
             // +------------------------------------------------------+                      
 
-                for (iSink = 0; iSink < objs->snk_pots_ssl_object_count; iSink++) {
-                    snk_pots_close(objs->snk_pots_ssl_objects[iSink]);
-                }
+                snk_pots_close(objs->snk_pots_ssl_object);
 
         // +----------------------------------------------------------+
         // | SST                                                      |
             // | Sinks                                                |
             // +------------------------------------------------------+                      
 
-                for (iSink = 0; iSink < objs->snk_tracks_sst_object_count; iSink++) {
-                    snk_tracks_close(objs->snk_tracks_sst_objects[iSink]);
-                }
-/*
-        // +----------------------------------------------------------+
-        // | SSS                                                      |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_spectra_sss_object_count; iSink++) {
-                    snk_spectra_close(objs->snk_spectra_sss_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | SSPF                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
+                snk_tracks_close(objs->snk_tracks_sst_object);
 
-                for (iSink = 0; iSink < objs->snk_spectra_sspf_object_count; iSink++) {
-                    snk_spectra_close(objs->snk_spectra_sspf_objects[iSink]);
-                }
-
-        // +----------------------------------------------------------+
-        // | ISTFT                                                    |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_istft_object_count; iSink++) {
-                    snk_hops_close(objs->snk_hops_istft_objects[iSink]);
-                }                
-
-        // +----------------------------------------------------------+
-        // | Gain                                                     |
-        // +----------------------------------------------------------+  
-
-            // +------------------------------------------------------+
-            // | Sinks                                                |
-            // +------------------------------------------------------+                      
-
-                for (iSink = 0; iSink < objs->snk_hops_gain_object_count; iSink++) {
-                    snk_hops_close(objs->snk_hops_gain_objects[iSink]);
-                }  
-*/
     }
 
     int threads_single_process(objects * objs, profiler * prf) {
 
         clock_t begin, end;
 
-        prf->duration += ((float) (objs->src_hops_raw_object->hopSize)) / ((float) (objs->src_hops_raw_object->fS));
+        prf->duration += ((float) (objs->src_hops_mics_object->hopSize)) / ((float) (objs->src_hops_mics_object->fS));
 
         // +----------------------------------------------------------+
         // | SECTION I                                                |
                 // +--------------------------------------------------+  
 
                     begin = clock();
-                    rtnValue = src_hops_process(objs->src_hops_raw_object);
+                    rtnValue = src_hops_process(objs->src_hops_mics_object);
                     end = clock();
-                    prf->src_hops_raw_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
+                    prf->src_hops_mics_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+   
 
                     begin = clock();
-                    con_hops_process(objs->con_hops_raw_object);
-                    end = clock();
-                    prf->con_hops_raw_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();
-                    for (iSink = 0; iSink < objs->snk_hops_raw_object_count; iSink++) {
-
-                        snk_hops_process(objs->snk_hops_raw_objects[iSink]);
-
-                    }
+                    con_hops_process(objs->con_hops_mics_raw_object);
                     end = clock();
-                    prf->snk_hops_raw_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);               
+                    prf->con_hops_mics_raw_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
             // +------------------------------------------------------+
             // | Mapping                                              |
                 // +--------------------------------------------------+  
 
                     begin = clock();
-                    mod_mapping_process(objs->mod_mapping_object);
+                    mod_mapping_process(objs->mod_mapping_mics_object);
                     end = clock();
-                    prf->mod_mapping_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
+                    prf->mod_mapping_mics_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+                     
 
                     begin = clock();
-                    con_hops_process(objs->con_hops_mapping_object);
+                    con_hops_process(objs->con_hops_mics_map_object);
                     end = clock();
-                    prf->con_hops_mapping_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();
-                    for (iSink = 0; iSink < objs->snk_hops_mapping_object_count; iSink++) {
-                        snk_hops_process(objs->snk_hops_mapping_objects[iSink]);
-                    }
-                    end = clock();
-                    prf->snk_hops_mapping_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                   
+                    prf->con_hops_mics_map_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
             // +------------------------------------------------------+
             // | Resample                                             |
                 // +--------------------------------------------------+  
 
                     begin = clock();
-                    mod_resample_process_push(objs->mod_resample_object);
+                    mod_resample_process_push(objs->mod_resample_mics_object);
                     end = clock();
-                    prf->mod_resample_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
+                    prf->mod_resample_mics_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
         // +----------------------------------------------------------+
         // | SECTION II                                               |
                 // +--------------------------------------------------+  
 
                     begin = clock();
-                    rtnResample = mod_resample_process_pop(objs->mod_resample_object);
+                    rtnResample = mod_resample_process_pop(objs->mod_resample_mics_object);
                     end = clock();
-                    prf->mod_resample_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
+                    prf->mod_resample_mics_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
                     // If there is no frames to process, stop
                     if (rtnResample == -1) {
                 // +--------------------------------------------------+      
 
                     begin = clock();
-                    con_hops_process(objs->con_hops_resample_object);
+                    con_hops_process(objs->con_hops_mics_rs_object);
                     end = clock();
-                    prf->con_hops_resample_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();
-                    for (iSink = 0; iSink < objs->snk_hops_resample_object_count; iSink++) {
-                        snk_hops_process(objs->snk_hops_resample_objects[iSink]);
-                    }
-                    end = clock();
-                    prf->snk_hops_resample_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                  
+                    prf->con_hops_mics_rs_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                
 
             // +------------------------------------------------------+
             // | STFT                                                 |
                 // +--------------------------------------------------+  
 
                     begin = clock();
-                    mod_stft_process(objs->mod_stft_object);
+                    mod_stft_process(objs->mod_stft_mics_object);
                     end = clock();
-                    prf->mod_stft_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
+                    prf->mod_stft_mics_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
 
                 // +--------------------------------------------------+
                 // | Connector                                        |
                 // +--------------------------------------------------+                     
 
                     begin = clock();
-                    con_spectra_process(objs->con_spectra_stft_object);
-                    end = clock();
-                    prf->con_spectra_stft_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                     
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();
-                    for (iSink = 0; iSink < objs->snk_spectra_stft_object_count; iSink++) {
-                        snk_spectra_process(objs->snk_spectra_stft_objects[iSink]);
-                    }
+                    con_spectra_process(objs->con_spectra_mics_object);
                     end = clock();
-                    prf->snk_spectra_stft_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                 
+                    prf->con_spectra_mics_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                     
 
             // +------------------------------------------------------+
             // | SSL                                                  |
                 // +--------------------------------------------------+                      
 
                     begin = clock();
-                    for (iSink = 0; iSink < objs->snk_pots_ssl_object_count; iSink++) {
-                        snk_pots_process(objs->snk_pots_ssl_objects[iSink]);
-                    }
+                    snk_pots_process(objs->snk_pots_ssl_object);
                     end = clock();
                     prf->snk_pots_ssl_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                
 
                 // +--------------------------------------------------+                      
 
                     begin = clock();
-                    for (iSink = 0; iSink < objs->snk_tracks_sst_object_count; iSink++) {
-                        snk_tracks_process(objs->snk_tracks_sst_objects[iSink]);
-                    }
+                    snk_tracks_process(objs->snk_tracks_sst_object);
                     end = clock();
                     prf->snk_tracks_sst_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
-/*
-            // +------------------------------------------------------+
-            // | SSS                                                  |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    begin = clock();
-                    mod_sss_process(objs->mod_sss_object);
-                    end = clock();
-                    prf->mod_sss_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                               
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+                     
-
-                    begin = clock();
-                    con_spectra_process(objs->con_spectra_sss_object);
-                    end = clock();
-                    prf->con_spectra_sss_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
-
-                    begin = clock();
-                    con_envs_process(objs->con_envs_sss_object);
-                    end = clock();
-                    prf->con_envs_sss_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();
-                    for (iSink = 0; iSink < objs->snk_spectra_sss_object_count; iSink++) {
-                        snk_spectra_process(objs->snk_spectra_sss_objects[iSink]);
-                    }
-                    end = clock();
-                    prf->snk_spectra_sss_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
-
-            // +------------------------------------------------------+
-            // | SSPF                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    begin = clock();
-                    mod_sspf_process(objs->mod_sspf_object);
-                    end = clock();
-                    prf->mod_sspf_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                              
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+                     
-
-                    begin = clock();
-                    con_spectra_process(objs->con_spectra_sspf_object);
-                    end = clock();
-                    prf->con_spectra_sspf_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
 
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();                    
-                    for (iSink = 0; iSink < objs->snk_spectra_sspf_object_count; iSink++) {
-                        snk_spectra_process(objs->snk_spectra_sspf_objects[iSink]);
-                    }
-                    end = clock();
-                    prf->snk_spectra_sspf_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
-
-            // +------------------------------------------------------+
-            // | ISTFT                                                |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    begin = clock();
-                    mod_istft_process(objs->mod_istft_object);
-                    end = clock();
-                    prf->mod_istft_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                              
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+                     
-
-                    begin = clock();
-                    con_hops_process(objs->con_hops_istft_object);
-                    end = clock();
-                    prf->con_hops_istft_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();                    
-                    for (iSink = 0; iSink < objs->snk_hops_istft_object_count; iSink++) {
-                        snk_hops_process(objs->snk_hops_istft_objects[iSink]);
-                    }
-                    end = clock();
-                    prf->snk_hops_istft_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);       
-
-            // +------------------------------------------------------+
-            // | Gain                                                 |
-            // +------------------------------------------------------+  
-
-                // +--------------------------------------------------+
-                // | Module                                           |
-                // +--------------------------------------------------+  
-
-                    begin = clock();
-                    mod_gain_process(objs->mod_gain_object);
-                    end = clock();
-                    prf->mod_gain_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                              
-
-                // +--------------------------------------------------+
-                // | Connector                                        |
-                // +--------------------------------------------------+                     
-
-                    begin = clock();
-                    con_hops_process(objs->con_hops_gain_object);
-                    end = clock();
-                    prf->con_hops_gain_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);                                                   
-
-                // +--------------------------------------------------+
-                // | Sinks                                            |
-                // +--------------------------------------------------+                      
-
-                    begin = clock();                    
-                    for (iSink = 0; iSink < objs->snk_hops_gain_object_count; iSink++) {
-                        snk_hops_process(objs->snk_hops_gain_objects[iSink]);
-                    }
-                    end = clock();
-                    prf->snk_hops_gain_prf += (float) (((double) (end-begin)) / CLOCKS_PER_SEC);     
-*/
             }
 
         return rtnValue;
index 2ff8197c9efc1fcf4745f41a269883cfb8775421..2518eaeba2d3ed04b5eee33330fd625fb43826a3 100644 (file)
@@ -1,10 +1,8 @@
 
-    #include "../../src/connector/con_envs.h"
     #include "../../src/connector/con_hops.h"
     #include "../../src/connector/con_pots.h"
     #include "../../src/connector/con_spectra.h"
     #include "../../src/connector/con_tracks.h"
-    #include "../../src/message/msg_envs.h"
     #include "../../src/message/msg_hops.h"
     #include "../../src/message/msg_pots.h"
     #include "../../src/message/msg_spectra.h"
@@ -14,8 +12,6 @@
     #include "../../src/module/mod_mapping.h"
     #include "../../src/module/mod_resample.h"
     #include "../../src/module/mod_ssl.h"
-    #include "../../src/module/mod_sspf.h"
-    #include "../../src/module/mod_sss.h"
     #include "../../src/module/mod_sst.h"
     #include "../../src/module/mod_stft.h"
     #include "../../src/sink/snk_hops.h"
     #include "../../src/sink/snk_tracks.h"
     #include "../../src/source/src_hops.h"
 
-    #include "../../src/aconnector/acon_envs.h"
     #include "../../src/aconnector/acon_hops.h"
     #include "../../src/aconnector/acon_pots.h"
     #include "../../src/aconnector/acon_spectra.h"
     #include "../../src/aconnector/acon_tracks.h"
-    #include "../../src/amessage/amsg_envs.h"
     #include "../../src/amessage/amsg_hops.h"
     #include "../../src/amessage/amsg_pots.h"
     #include "../../src/amessage/amsg_spectra.h"
@@ -39,8 +33,6 @@
     #include "../../src/amodule/amod_mapping.h"
     #include "../../src/amodule/amod_resample.h"
     #include "../../src/amodule/amod_ssl.h"
-    #include "../../src/amodule/amod_sspf.h"
-    #include "../../src/amodule/amod_sss.h"
     #include "../../src/amodule/amod_sst.h"
     #include "../../src/amodule/amod_stft.h"
     #include "../../src/asink/asnk_hops.h"
diff --git a/src/aconnector/acon_envs.c b/src/aconnector/acon_envs.c
deleted file mode 100644 (file)
index 95bce71..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-    
-    #include "acon_envs.h"
-
-    acon_envs_obj * acon_envs_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_envs_cfg * msg_envs_config) {
-
-        acon_envs_obj * obj;
-        unsigned int iOut;
-
-        obj = (acon_envs_obj *) malloc(sizeof(acon_envs_obj));
-
-        obj->in = amsg_envs_construct(nMessages, msg_envs_config);
-
-        obj->outs = (amsg_envs_obj **) malloc(sizeof(amsg_envs_obj *) * nOuts);
-        for (iOut = 0; iOut < nOuts; iOut++) {
-            obj->outs[iOut] = amsg_envs_construct(nMessages, msg_envs_config);
-        }
-
-        obj->con_envs = con_envs_construct(nOuts, msg_envs_config);
-
-        obj->thread = thread_construct(&acon_envs_thread, (void *) obj);
-
-        return obj;
-
-    }
-
-    void acon_envs_destroy(acon_envs_obj * obj) {
-
-        unsigned int iOut;
-        unsigned int nOuts;
-
-        nOuts = obj->con_envs->nOuts;
-
-        thread_destroy(obj->thread);
-
-        con_envs_destroy(obj->con_envs);
-
-        for (iOut = 0; iOut < nOuts; iOut++) {
-            amsg_envs_destroy(obj->outs[iOut]);
-        }
-        free((void *) obj->outs);
-
-        amsg_envs_destroy(obj->in);
-
-        free((void *) obj);
-
-
-    }
-
-    void * acon_envs_thread(void * ptr) {
-
-        msg_envs_obj * msg_envs_in;
-        msg_envs_obj * msg_envs_out;
-
-        acon_envs_obj * obj;
-        unsigned int iOut;
-        unsigned int nOuts;
-        int rtnValue;
-
-        obj = (acon_envs_obj *) ptr;
-
-        nOuts = obj->con_envs->nOuts;
-
-        while(1) {
-
-            msg_envs_in = amsg_envs_filled_pop(obj->in);
-            msg_envs_copy(obj->con_envs->in, msg_envs_in);
-            amsg_envs_empty_push(obj->in, msg_envs_in);
-
-            rtnValue = con_envs_process(obj->con_envs);
-
-            for (iOut = 0; iOut < nOuts; iOut++) {
-                
-                msg_envs_out = amsg_envs_empty_pop(obj->outs[iOut]);
-                msg_envs_copy(msg_envs_out, obj->con_envs->outs[iOut]);
-                amsg_envs_filled_push(obj->outs[iOut], msg_envs_out);
-
-            }
-
-            if (rtnValue == -1) {
-                break;
-            }
-
-        }
-
-    }
\ No newline at end of file
diff --git a/src/aconnector/acon_envs.h b/src/aconnector/acon_envs.h
deleted file mode 100644 (file)
index 3cf076c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __ODAS_ACONNECTOR_ENVS
-#define __ODAS_ACONNECTOR_ENVS
-
-    #include "../connector/con_envs.h"
-    #include "../amessage/amsg_envs.h"
-    #include "../message/msg_envs.h"
-    #include "../general/thread.h"
-
-    #include <stdlib.h>
-    #include <stdio.h>
-
-    typedef struct acon_envs_obj {
-
-        amsg_envs_obj * in;
-        amsg_envs_obj ** outs;
-        con_envs_obj * con_envs;
-        thread_obj * thread;
-
-    } acon_envs_obj;
-
-    acon_envs_obj * acon_envs_construct(const unsigned int nOuts, const unsigned int nMessages, const msg_envs_cfg * msg_envs_config);
-
-    void acon_envs_destroy(acon_envs_obj * obj);
-
-    void * acon_envs_thread(void * ptr);
-
-#endif
\ No newline at end of file
diff --git a/src/amessage/amsg_envs.c b/src/amessage/amsg_envs.c
deleted file mode 100644 (file)
index 96f1747..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-    
-    #include "amsg_envs.h"
-
-    amsg_envs_obj * amsg_envs_construct(const unsigned int nMessages, const msg_envs_cfg * msg_envs_config) {
-
-        amsg_envs_obj * obj;
-        unsigned int iMessage;
-
-        obj = (amsg_envs_obj *) malloc(sizeof(amsg_envs_obj));
-
-        obj->nMessages = nMessages;
-        obj->filled = fifo_construct_zero(nMessages);
-        obj->empty = fifo_construct_zero(nMessages);
-
-        for (iMessage = 0; iMessage < nMessages; iMessage++) {
-
-            fifo_push(obj->empty, (void *) msg_envs_construct(msg_envs_config));
-
-        }
-
-        return obj;
-
-    }
-
-    void amsg_envs_destroy(amsg_envs_obj * obj) {
-
-        while(fifo_nElements(obj->filled) > 0) {
-            msg_envs_destroy((void *) fifo_pop(obj->filled));
-        }
-
-        while(fifo_nElements(obj->empty) > 0) {
-            msg_envs_destroy((void *) fifo_pop(obj->empty));
-        }
-
-        fifo_destroy(obj->filled);
-        fifo_destroy(obj->empty);
-
-        free((void *) obj);
-
-    }
-
-    msg_envs_obj * amsg_envs_filled_pop(amsg_envs_obj * obj) {
-
-        return ((msg_envs_obj *) fifo_pop(obj->filled));
-
-    }
-
-    void amsg_envs_filled_push(amsg_envs_obj * obj, msg_envs_obj * msg_envs) {
-
-        fifo_push(obj->filled, (void *) msg_envs);
-
-    }
-
-    msg_envs_obj * amsg_envs_empty_pop(amsg_envs_obj * obj) {
-
-        return ((msg_envs_obj *) fifo_pop(obj->empty));
-
-    }
-
-    void amsg_envs_empty_push(amsg_envs_obj * obj, msg_envs_obj * msg_envs) {
-
-        fifo_push(obj->empty, (void *) msg_envs);
-
-    }
\ No newline at end of file
diff --git a/src/amessage/amsg_envs.h b/src/amessage/amsg_envs.h
deleted file mode 100644 (file)
index 686a3ff..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __ODAS_AMESSAGE_ENVS
-#define __ODAS_AMESSAGE_ENVS
-
-    #include <stdlib.h>
-
-    #include "../message/msg_envs.h"
-    #include "../utils/fifo.h"
-
-    typedef struct amsg_envs_obj {
-
-        unsigned int nMessages;
-        fifo_obj * filled;
-        fifo_obj * empty;
-
-    } amsg_envs_obj;
-
-    amsg_envs_obj * amsg_envs_construct(const unsigned int nMessages, const msg_envs_cfg * msg_envs_config);
-
-    void amsg_envs_destroy(amsg_envs_obj * obj);
-
-    msg_envs_obj * amsg_envs_filled_pop(amsg_envs_obj * obj);
-
-    void amsg_envs_filled_push(amsg_envs_obj * obj, msg_envs_obj * msg_envs);
-
-    msg_envs_obj * amsg_envs_empty_pop(amsg_envs_obj * obj);
-
-    void amsg_envs_empty_push(amsg_envs_obj * obj, msg_envs_obj * msg_envs);
-
-#endif
\ No newline at end of file
diff --git a/src/amodule/amod_sspf.c b/src/amodule/amod_sspf.c
deleted file mode 100644 (file)
index ae1202b..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-    
-    #include "amod_sspf.h"
-
-    amod_sspf_obj * amod_sspf_construct(const mod_sspf_cfg * mod_sspf_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config) {
-
-        amod_sspf_obj * obj;
-
-        obj = (amod_sspf_obj *) malloc(sizeof(amod_sspf_obj));
-    
-        obj->mod_sspf = mod_sspf_construct(mod_sspf_config, msg_tracks_config, msg_spectra_config, msg_envs_config);
-    
-        obj->in1 = (amsg_spectra_obj *) NULL;
-        obj->in2 = (amsg_envs_obj *) NULL;
-        obj->in3 = (amsg_tracks_obj *) NULL;
-        obj->out = (amsg_spectra_obj *) NULL;
-        
-        obj->thread = thread_construct(&amod_sspf_thread, (void *) obj);
-
-        return obj;
-
-    }
-
-    void amod_sspf_destroy(amod_sspf_obj * obj) {
-
-        mod_sspf_destroy(obj->mod_sspf);
-        thread_destroy(obj->thread);
-
-        free((void *) obj); 
-
-    }
-
-    void amod_sspf_connect(amod_sspf_obj * obj, amsg_spectra_obj * in1, amsg_envs_obj * in2, amsg_tracks_obj * in3, amsg_spectra_obj * out) {
-
-        obj->in1 = in1;
-        obj->in2 = in2;
-        obj->in3 = in3;
-        obj->out = out;
-
-    }
-
-    void amod_sspf_disconnect(amod_sspf_obj * obj) {
-
-        obj->in1 = (amsg_spectra_obj *) NULL;
-        obj->in2 = (amsg_envs_obj *) NULL;
-        obj->in3 = (amsg_tracks_obj *) NULL;
-        obj->out = (amsg_spectra_obj *) NULL;
-
-    }
-
-    void * amod_sspf_thread(void * ptr) {
-
-        amod_sspf_obj * obj;
-        msg_spectra_obj * msg_spectra_in;
-        msg_envs_obj * msg_envs_in;
-        msg_tracks_obj * msg_tracks_in;
-        msg_spectra_obj * msg_spectra_out;
-        int rtnValue;
-
-        obj = (amod_sspf_obj *) ptr;
-
-        while(1) {
-
-            // Pop a message, process, and push back
-            msg_spectra_in = amsg_spectra_filled_pop(obj->in1);
-            msg_envs_in = amsg_envs_filled_pop(obj->in2);
-            msg_tracks_in = amsg_tracks_filled_pop(obj->in3);
-            msg_spectra_out = amsg_spectra_empty_pop(obj->out);
-            mod_sspf_connect(obj->mod_sspf, msg_spectra_in, msg_envs_in, msg_tracks_in, msg_spectra_out);
-            rtnValue = mod_sspf_process(obj->mod_sspf);
-            mod_sspf_disconnect(obj->mod_sspf);
-            amsg_spectra_empty_push(obj->in1, msg_spectra_in);
-            amsg_envs_empty_push(obj->in2, msg_envs_in);
-            amsg_tracks_empty_push(obj->in3, msg_tracks_in);
-            amsg_spectra_filled_push(obj->out, msg_spectra_out);
-
-            // If this is the last frame, rtnValue = -1
-            if (rtnValue == -1) {
-                break;
-            }
-
-        }
-
-    }
\ No newline at end of file
diff --git a/src/amodule/amod_sspf.h b/src/amodule/amod_sspf.h
deleted file mode 100644 (file)
index df079ce..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __ODAS_AMODULE_SSPF
-#define __ODAS_AMODULE_SSPF
-
-    #include "../module/mod_sspf.h"
-    #include "../amessage/amsg_envs.h"
-    #include "../amessage/amsg_tracks.h"
-    #include "../amessage/amsg_spectra.h"
-    #include "../general/thread.h"
-
-    typedef struct amod_sspf_obj {
-
-        mod_sspf_obj * mod_sspf;
-        amsg_spectra_obj * in1;
-        amsg_envs_obj * in2;
-        amsg_tracks_obj * in3;
-        amsg_spectra_obj * out;
-        thread_obj * thread;    
-
-    } amod_sspf_obj;
-
-    amod_sspf_obj * amod_sspf_construct(const mod_sspf_cfg * mod_sspf_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config);
-
-    void amod_sspf_destroy(amod_sspf_obj * obj);
-
-    void amod_sspf_connect(amod_sspf_obj * obj, amsg_spectra_obj * in1, amsg_envs_obj * in2, amsg_tracks_obj * in3, amsg_spectra_obj * out);
-
-    void amod_sspf_disconnect(amod_sspf_obj * obj);
-
-    void * amod_sspf_thread(void * ptr);        
-
-#endif
\ No newline at end of file
index 215cabd2a10336f3eb93184f1d53b63051f58d03..8cbffdbd4aecae22383fcdb349c1a1fe477dab96 100644 (file)
@@ -1,18 +1,18 @@
 
     #include "amod_sss.h"
 
-    amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config) {
+    amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config) {
 
         amod_sss_obj * obj;
 
         obj = (amod_sss_obj *) malloc(sizeof(amod_sss_obj));
 
-        obj->mod_sss = mod_sss_construct(mod_sss_config, msg_tracks_config, msg_spectra_config, msg_envs_config);
+        obj->mod_sss = mod_sss_construct(mod_sss_config, msg_tracks_config, msg_spectra_config);
 
         obj->in1 = (amsg_spectra_obj *) NULL;
         obj->in2 = (amsg_tracks_obj *) NULL;
         obj->out1 = (amsg_spectra_obj *) NULL;
-        obj->out2 = (amsg_envs_obj *) NULL;
+        obj->out2 = (amsg_spectra_obj *) NULL;
         
         obj->thread = thread_construct(&amod_sss_thread, (void *) obj);
 
@@ -29,7 +29,7 @@
 
     }
 
-    void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_tracks_obj * in2, amsg_spectra_obj * out1, amsg_envs_obj * out2) {
+    void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_tracks_obj * in2, amsg_spectra_obj * out1, amsg_spectra_obj * out2) {
 
         obj->in1 = in1;
         obj->in2 = in2;
@@ -43,7 +43,7 @@
         obj->in1 = (amsg_spectra_obj *) NULL;
         obj->in2 = (amsg_tracks_obj *) NULL;
         obj->out1 = (amsg_spectra_obj *) NULL;
-        obj->out2 = (amsg_envs_obj *) NULL;
+        obj->out2 = (amsg_spectra_obj *) NULL;
 
     }
 
@@ -52,8 +52,8 @@
         amod_sss_obj * obj;
         msg_spectra_obj * msg_spectra_in;
         msg_tracks_obj * msg_tracks_in;
-        msg_spectra_obj * msg_spectra_out;
-        msg_envs_obj * msg_envs_out;
+        msg_spectra_obj * msg_spectra_out1;
+        msg_spectra_obj * msg_spectra_out2;
         int rtnValue;
 
         obj = (amod_sss_obj *) ptr;
             // Pop a message, process, and push back
             msg_spectra_in = amsg_spectra_filled_pop(obj->in1);
             msg_tracks_in = amsg_tracks_filled_pop(obj->in2);
-            msg_spectra_out = amsg_spectra_empty_pop(obj->out1);
-            msg_envs_out = amsg_envs_empty_pop(obj->out2);
-            mod_sss_connect(obj->mod_sss, msg_spectra_in, msg_tracks_in, msg_spectra_out, msg_envs_out);
+            msg_spectra_out1 = amsg_spectra_empty_pop(obj->out1);
+            msg_spectra_out2 = amsg_spectra_empty_pop(obj->out2);
+            mod_sss_connect(obj->mod_sss, msg_spectra_in, msg_tracks_in, msg_spectra_out1, msg_spectra_out2);
             rtnValue = mod_sss_process(obj->mod_sss);
             mod_sss_disconnect(obj->mod_sss);
             amsg_spectra_empty_push(obj->in1, msg_spectra_in);
             amsg_tracks_empty_push(obj->in2, msg_tracks_in);
-            amsg_spectra_filled_push(obj->out1, msg_spectra_out);
-            amsg_envs_filled_push(obj->out2, msg_envs_out);
+            amsg_spectra_filled_push(obj->out1, msg_spectra_out1);
+            amsg_spectra_filled_push(obj->out2, msg_spectra_out2);
 
             // If this is the last frame, rtnValue = -1
             if (rtnValue == -1) {
index a68bf1fd4f512aca388e5817de773e9f1139127c..12adcdaf2229d0feece95ac05af0531017af1c33 100644 (file)
@@ -2,7 +2,6 @@
 #define __ODAS_AMODULE_SSS
 
     #include "../module/mod_sss.h"
-    #include "../amessage/amsg_envs.h"
     #include "../amessage/amsg_tracks.h"
     #include "../amessage/amsg_spectra.h"
     #include "../general/thread.h"
         amsg_spectra_obj * in1;
         amsg_tracks_obj * in2;
         amsg_spectra_obj * out1;
-        amsg_envs_obj * out2;
+        amsg_spectra_obj * out2;
         thread_obj * thread;    
 
     } amod_sss_obj;
 
-    amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config);
+    amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config);
 
     void amod_sss_destroy(amod_sss_obj * obj);
 
-    void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_tracks_obj * in2, amsg_spectra_obj * out1, amsg_envs_obj * out2);
+    void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_tracks_obj * in2, amsg_spectra_obj * out1, amsg_spectra_obj * out2);
 
     void amod_sss_disconnect(amod_sss_obj * obj);
 
diff --git a/src/asink/asnk_xcorrs.c b/src/asink/asnk_xcorrs.c
deleted file mode 100644 (file)
index b17fca5..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-    
-    #include "asnk_xcorrs.h"
-
-    asnk_xcorrs_obj * asnk_xcorrs_construct(const snk_xcorrs_cfg * snk_xcorrs_config, const msg_xcorrs_cfg * msg_xcorrs_config) {
-
-        asnk_xcorrs_obj * obj;
-
-        obj = (asnk_xcorrs_obj *) malloc(sizeof(asnk_xcorrs_obj));
-
-        obj->snk_spectra = snk_xcorrs_construct(snk_xcorrs_config, msg_xcorrs_config);
-        obj->in = (amsg_xcorrs_obj *) NULL;
-
-        obj->thread = thread_construct(&asnk_xcorrs_thread, (void *) obj);
-
-        return obj;
-
-    }
-
-    void asnk_xcorrs_destroy(asnk_xcorrs_obj * obj) {
-
-        snk_xcorrs_destroy(obj->snk_spectra);
-        thread_destroy(obj->thread);
-
-        free((void *) obj);
-
-    }
-
-    void asnk_xcorrs_connect(asnk_xcorrs_obj * obj, amsg_xcorrs_obj * in) {
-
-        obj->in = in;
-
-    }
-
-    void asnk_xcorrs_disconnect(asnk_xcorrs_obj * obj) {
-
-        obj->in = (amsg_xcorrs_obj *) NULL;
-
-    }
-
-    void * asnk_xcorrs_thread(void * ptr) {
-
-        asnk_xcorrs_obj * obj;
-        msg_xcorrs_obj * msg_xcorrs_in;
-        int rtnValue;
-
-        obj = (asnk_xcorrs_obj *) ptr;
-
-        // Open the sink
-        snk_xcorrs_open(obj->snk_spectra);
-
-        while(1) {
-
-            // Pop a message, process, and push back
-            msg_xcorrs_in = amsg_xcorrs_filled_pop(obj->in);
-            snk_xcorrs_connect(obj->snk_spectra, msg_xcorrs_in);
-            rtnValue = snk_xcorrs_process(obj->snk_spectra);
-            snk_xcorrs_disconnect(obj->snk_spectra);
-            amsg_xcorrs_empty_push(obj->in, msg_xcorrs_in);
-
-            // If this is the last frame, rtnValue = -1
-            if (rtnValue == -1) {
-                break;
-            }
-
-        }
-
-        // Close the sink
-        snk_xcorrs_close(obj->snk_spectra);
-
-    }
\ No newline at end of file
diff --git a/src/asink/asnk_xcorrs.h b/src/asink/asnk_xcorrs.h
deleted file mode 100644 (file)
index 1d86b4c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef __ODAS_ASINK_XCORRS
-#define __ODAS_ASINK_XCORRS
-
-    #include "../amessage/amsg_xcorrs.h"
-    #include "../sink/snk_xcorrs.h"
-    #include "../general/thread.h"
-
-    #include <stdlib.h>
-
-    typedef struct asnk_xcorrs_obj {
-
-        snk_xcorrs_obj * snk_xcorrs;
-        amsg_xcorrs_obj * in;
-        thread_obj * thread;
-
-    } asnk_xcorrs_obj;
-
-    asnk_xcorrs_obj * asnk_xcorrs_construct(const snk_xcorrs_cfg * snk_xcorrs_config, const msg_xcorrs_cfg * msg_xcorrs_config);
-
-    void asnk_xcorrs_destroy(asnk_xcorrs_obj * obj);
-
-    void asnk_xcorrs_connect(asnk_xcorrs_obj * obj, amsg_xcorrs_obj * in);
-
-    void asnk_xcorrs_disconnect(asnk_xcorrs_obj * obj);
-
-    void * asnk_xcorrs_thread(void * ptr);
-
-#endif
\ No newline at end of file
diff --git a/src/asource/asrc_spectra.c b/src/asource/asrc_spectra.c
deleted file mode 100644 (file)
index d9d95a1..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-    
-    #include "asrc_spectra.h"
-
-    asrc_spectra_obj * asrc_spectra_construct(const src_spectra_cfg * src_spectra_config, const msg_spectra_cfg * msg_spectra_config) {
-
-        asrc_spectra_obj * obj;
-
-        obj = (asrc_spectra_obj *) malloc(sizeof(asrc_spectra_obj));
-
-        obj->src_spectra = src_spectra_construct(src_spectra_config, msg_spectra_config);
-        obj->out = (amsg_spectra_obj *) NULL;
-
-        obj->thread = thread_construct(&asrc_spectra_thread, (void *) obj);
-
-        return obj;
-
-    }
-
-    void asrc_spectra_destroy(asrc_spectra_obj * obj) {
-
-        src_spectra_destroy(obj->src_spectra);
-        thread_destroy(obj->thread);
-
-        free((void *) obj);
-
-    }
-
-    void asrc_spectra_connect(asrc_spectra_obj * obj, amsg_spectra_obj * out) {
-
-        obj->out = out;
-
-    }
-
-    void asrc_spectra_disconnect(asrc_spectra_obj * obj) {
-
-        obj->out = (amsg_spectra_obj *) NULL;
-
-    }
-
-    void * asrc_spectra_thread(void * ptr) {
-
-        asrc_spectra_obj * obj;
-        msg_spectra_obj * msg_spectra_out;
-        int rtnValue;
-
-        obj = (asrc_spectra_obj *) ptr;
-
-        // Open the source
-        src_spectra_open(obj->src_spectra);
-
-        while(1) {
-
-            // Pop a message, process, and push back
-            msg_spectra_out = amsg_spectra_empty_pop(obj->out);
-            src_spectra_connect(obj->src_spectra, msg_spectra_out);
-            rtnValue = src_spectra_process(obj->src_spectra);
-            src_spectra_disconnect(obj->src_spectra);
-            amsg_spectra_filled_push(obj->out, msg_spectra_out);
-
-            // If this is the last frame, rtnValue = -1
-            if (rtnValue == -1) {
-                break;
-            }
-
-            // Some other process may ask to stop the thread
-            if (thread_askedToStop(obj->thread) == 1) {
-                break;
-            }
-
-        }
-
-        // Close the source
-        src_spectra_close(obj->src_spectra);
-
-        // Send the "0" message, that kills all connected threads
-        // that will consume this message
-        msg_spectra_out = amsg_spectra_empty_pop(obj->out);
-        msg_spectra_zero(msg_spectra_out);
-        amsg_spectra_filled_push(obj->out, msg_spectra_out);
-
-    }
\ No newline at end of file
diff --git a/src/asource/asrc_spectra.h b/src/asource/asrc_spectra.h
deleted file mode 100644 (file)
index 80976ad..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef __ODAS_ASOURCE_SPECTRA
-#define __ODAS_ASOURCE_SPECTRA
-
-    #include "../amessage/amsg_spectra.h"
-    #include "../source/src_spectra.h"
-    #include "../general/thread.h"
-
-    #include <stdlib.h>
-
-    typedef struct asrc_spectra_obj {
-
-        src_spectra_obj * src_spectra;
-        amsg_spectra_obj * out;
-        thread_obj * thread;
-
-    } asrc_spectra_obj;
-
-    asrc_spectra_obj * asrc_spectra_construct(const src_spectra_cfg * src_spectra_config, const msg_spectra_cfg * msg_spectra_config);
-
-    void asrc_spectra_destroy(asrc_spectra_obj * obj);
-
-    void asrc_spectra_connect(asrc_spectra_obj * obj, amsg_spectra_obj * out);
-
-    void asrc_spectra_disconnect(asrc_spectra_obj * obj);
-
-    void * asrc_spectra_thread(void * ptr);
-
-#endif
\ No newline at end of file
diff --git a/src/connector/con_envs.c b/src/connector/con_envs.c
deleted file mode 100644 (file)
index 7c69e0b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-    
-    #include "con_envs.h"
-
-    con_envs_obj * con_envs_construct(const unsigned int nOuts, const msg_envs_cfg * msg_envs_config) {
-
-        con_envs_obj * obj;
-        unsigned int iOut;
-
-        obj = (con_envs_obj *) malloc(sizeof(con_envs_obj));
-
-        obj->nOuts = nOuts;
-
-        obj->in = msg_envs_construct(msg_envs_config);
-
-        obj->outs = (msg_envs_obj **) malloc(sizeof(msg_envs_obj *) * nOuts);
-        for (iOut = 0; iOut < obj->nOuts; iOut++) {
-            obj->outs[iOut] = msg_envs_construct(msg_envs_config);
-        }
-
-        return obj;
-
-    }
-
-    void con_envs_destroy(con_envs_obj * obj) {
-
-        unsigned int iOut;
-
-        for (iOut = 0; iOut < obj->nOuts; iOut++) {
-            msg_envs_destroy(obj->outs[iOut]);
-        }
-        free((void *) obj->outs);
-
-        msg_envs_destroy(obj->in);
-
-        free((void *) obj);
-
-    }
-
-    int con_envs_process(con_envs_obj * obj) {
-
-        unsigned int iOut;
-        int rtnValue;
-
-        for (iOut = 0; iOut < obj->nOuts; iOut++) {
-            msg_envs_copy(obj->outs[iOut], obj->in);
-        }
-
-        if (msg_envs_isZero(obj->in) == 1) {
-            rtnValue = -1;
-        }
-        else {
-            rtnValue = 0;
-        }
-
-        return rtnValue;
-
-    }
\ No newline at end of file
diff --git a/src/connector/con_envs.h b/src/connector/con_envs.h
deleted file mode 100644 (file)
index ea6fa27..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __ODAS_CONNECTOR_ENVS
-#define __ODAS_CONNECTOR_ENVS
-
-    #include "../message/msg_envs.h"
-
-    #include <stdlib.h>
-    #include <stdio.h>
-
-    typedef struct con_envs_obj {
-
-        msg_envs_obj * in;
-        msg_envs_obj ** outs;
-
-        unsigned int nOuts;
-
-    } con_envs_obj;
-
-    con_envs_obj * con_envs_construct(const unsigned int nOuts, const msg_envs_cfg * msg_envs_config);
-
-    void con_envs_destroy(con_envs_obj * obj);
-
-    int con_envs_process(con_envs_obj * obj);
-
-#endif
\ No newline at end of file
index 6586ce3f0924c185fb2d3682c63d04afdcf9ad62..2d14f7df051b4103e8c931c08d27b5a9d4b0fddf 100644 (file)
@@ -13,7 +13,7 @@
 
     }
 
-    format_obj * format_construct_bin(const unsigned int nBits) {
+    format_obj * format_construct_binary_int(const unsigned int nBits) {
 
         format_obj * obj;
 
 
             case 8:
 
-                obj->type = format_bin08;
+                obj->type = format_binary_int08;
 
             break;
 
             case 16:
 
-                obj->type = format_bin16;
+                obj->type = format_binary_int16;
 
             break;
 
             case 24:
 
-                obj->type = format_bin24;
+                obj->type = format_binary_int24;
 
             break;
 
             case 32:
 
-                obj->type = format_bin32;
+                obj->type = format_binary_int32;
 
             break;
 
 
     }
 
-    format_obj * format_construct_float() {
+    format_obj * format_construct_binary_float() {
 
         format_obj * obj;
 
         obj = (format_obj *) malloc(sizeof(format_obj));
 
-        obj->type = format_float;
+        obj->type = format_binary_float;
 
         return obj;
 
     }
 
-    format_obj * format_construct_json() {
+    format_obj * format_construct_text_json() {
 
         format_obj * obj;
 
         obj = (format_obj *) malloc(sizeof(format_obj));
 
-        obj->type = format_json;
+        obj->type = format_text_json;
 
         return obj;
 
 
             switch(obj->type) {
 
-                case format_bin08:
-                    printf("type = bin08\n");
+                case format_binary_int08:
+                    printf("type = binary_int08\n");
                 break;
 
-                case format_bin16:
-                    printf("type = bin16\n");
+                case format_binary_int16:
+                    printf("type = binary_int16\n");
                 break;
 
-                case format_bin24:
-                    printf("type = bin24\n");
+                case format_binary_int24:
+                    printf("type = binary_int24\n");
                 break;
 
-                case format_bin32:
-                    printf("type = bin32\n");
+                case format_binary_int32:
+                    printf("type = binary_int32\n");
                 break;
 
-                case format_float:
-                    printf("type = float\n");
+                case format_binary_float:
+                    printf("type = binary_float\n");
                 break;
 
-                case format_json:
-                    printf("type = json\n");
+                case format_text_json:
+                    printf("type = text_json\n");
                 break;
 
             }
index 5a15b242f818f8e69c2b21c549ee48af5585f1d4..e3379441fe0fc573cfe90fbcd8326f15a4018760 100644 (file)
@@ -7,12 +7,12 @@
     typedef enum format_type { 
         
         format_undefined = 0,
-        format_bin08 = 8, 
-        format_bin16 = 16, 
-        format_bin24 = 24, 
-        format_bin32 = 32, 
-        format_float = 1, 
-        format_json = 2,
+        format_binary_int08 = 8, 
+        format_binary_int16 = 16, 
+        format_binary_int24 = 24, 
+        format_binary_int32 = 32, 
+        format_binary_float = 1, 
+        format_text_json = 2,
 
     } format_type;
 
 
     format_obj * format_construct();
 
-    format_obj * format_construct_bin(const unsigned int nBits);
+    format_obj * format_construct_binary_int(const unsigned int nBits);
 
-    format_obj * format_construct_float();    
+    format_obj * format_construct_binary_float();    
 
-    format_obj * format_construct_json();
+    format_obj * format_construct_text_json();
 
     format_obj * format_clone(const format_obj * obj);
 
index 3a77ebeb125a13eba40a7e2a6c8eb9e350d8bfe2..e16e9df201fec85186e91f339256ac99baaa53e3 100644 (file)
 
             obj->type = interface_undefined;
 
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
+        // +----------------------------------------------------------+
+        // | File                                                     |
+        // +----------------------------------------------------------+
+
+            obj->fileName = (char *) NULL;
+
+        // +----------------------------------------------------------+
+        // | Socket                                                   |
+        // +----------------------------------------------------------+
+
+            obj->ip = (char *) NULL;
+            obj->port = 0;
+
+        // +----------------------------------------------------------+
+        // | Soundcard                                                |
+        // +----------------------------------------------------------+
+
+            obj->card = 0;
+            obj->device = 0;
+
+        // +----------------------------------------------------------+
+        // | Terminal                                                 |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
+        return obj;
+
+    }
+
+    interface_obj * interface_construct_blackhole() {
+
+        interface_obj * obj;
+
+        obj = (interface_obj *) malloc(sizeof(interface_obj));
+
+        // +----------------------------------------------------------+
+        // | Type                                                     |
+        // +----------------------------------------------------------+
+
+            obj->type = interface_blackhole;
+
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
         // +----------------------------------------------------------+
         // | File                                                     |
         // +----------------------------------------------------------+
 
             obj->type = interface_file;
 
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
         // +----------------------------------------------------------+
         // | File                                                     |
         // +----------------------------------------------------------+
 
             obj->type = interface_socket;
 
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
         // +----------------------------------------------------------+
         // | File                                                     |
         // +----------------------------------------------------------+
 
             obj->type = interface_soundcard;
 
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
         // +----------------------------------------------------------+
         // | File                                                     |
         // +----------------------------------------------------------+
 
             obj->type = interface_terminal;
 
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
         // +----------------------------------------------------------+
         // | File                                                     |
         // +----------------------------------------------------------+
 
             clone->type = obj->type;        
 
+        // +----------------------------------------------------------+
+        // | Blackhole                                                |
+        // +----------------------------------------------------------+
+
+            // (Empty)
+
         // +----------------------------------------------------------+
         // | File                                                     |
         // +----------------------------------------------------------+
 
             switch(obj->type) {
 
+                case interface_blackhole:
+
+                    printf("type = blackhole\n");
+
+                break;
+
                 case interface_file:
 
                     printf("type = file, fileName = %s\n",obj->fileName);
index d16d956ec535c3a2fffd02a066aec22dd0bbc309..e7f50bde752cfce657b61c383dcb3ef8f51d6de1 100644 (file)
@@ -8,10 +8,11 @@
     typedef enum interface_type { 
         
         interface_undefined = 0,
-        interface_file = 1,
-        interface_socket = 2, 
-        interface_soundcard = 3, 
-        interface_terminal = 4,
+        interface_blackhole = 1,
+        interface_file = 2,
+        interface_socket = 3, 
+        interface_soundcard = 4, 
+        interface_terminal = 5,
         
     } interface_type;
 
@@ -31,6 +32,8 @@
 
     interface_obj * interface_construct();
 
+    interface_obj * interface_construct_blackhole();
+
     interface_obj * interface_construct_file(const char * fileName);
 
     interface_obj * interface_construct_socket(const char * ip, const unsigned int port);
diff --git a/src/message/msg_envs.c b/src/message/msg_envs.c
deleted file mode 100644 (file)
index 9ac4e44..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-    
-    #include "msg_envs.h"
-
-    msg_envs_obj * msg_envs_construct(const msg_envs_cfg * msg_envs_config) {
-
-        msg_envs_obj * obj;
-
-        obj = (msg_envs_obj *) malloc(sizeof(msg_envs_obj));
-
-        obj->timeStamp = 0;
-        obj->fS = msg_envs_config->fS;
-        obj->envs = envs_construct_zero(msg_envs_config->nChannels, msg_envs_config->halfFrameSize);
-
-        return obj;
-
-    }
-
-    void msg_envs_destroy(msg_envs_obj * obj) {
-
-        free((void *) obj->envs);
-        free((void *) obj);
-
-    }
-
-    void msg_envs_copy(msg_envs_obj * dest, const msg_envs_obj * src) {
-
-        dest->timeStamp = src->timeStamp;
-        dest->fS = src->fS;
-        envs_copy(dest->envs, src->envs);
-
-    }
-
-    void msg_envs_zero(msg_envs_obj * obj) {
-
-        obj->timeStamp = 0;
-        obj->fS = 0;
-        envs_zero(obj->envs);
-
-    }
-
-    unsigned int msg_envs_isZero(const msg_envs_obj * obj) {
-
-        unsigned int rtnValue;
-
-        if (obj->timeStamp == 0) {
-            rtnValue = 1;
-        }
-        else {
-            rtnValue = 0;
-        }
-
-        return rtnValue;
-
-    }
-
-    msg_envs_cfg * msg_envs_cfg_construct(void) {
-
-        msg_envs_cfg * cfg;
-
-        cfg = (msg_envs_cfg *) malloc(sizeof(msg_envs_cfg));
-
-        cfg->halfFrameSize = 0;
-        cfg->nChannels = 0;
-        cfg->fS = 0;
-
-        return cfg;
-
-    }
-
-    void msg_envs_cfg_destroy(msg_envs_cfg * msg_envs_config) {
-
-        free((void *) msg_envs_config);
-
-    }
-
-    void msg_envs_cfg_printf(const msg_envs_cfg * msg_envs_config) {
-
-        if (msg_envs_config != NULL) {
-
-            printf("halfFrameSize = %u\n", msg_envs_config->halfFrameSize);
-            printf("nChannels = %u\n", msg_envs_config->nChannels);
-            printf("fS = %u\n", msg_envs_config->fS);
-
-        }
-        else {
-
-            printf("(null)\n");
-
-        }       
-
-    }
\ No newline at end of file
diff --git a/src/message/msg_envs.h b/src/message/msg_envs.h
deleted file mode 100644 (file)
index da4c128..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef __ODAS_MESSAGE_ENVS
-#define __ODAS_MESSAGE_ENVS
-
-    #include <stdlib.h>
-
-    #include "../signal/env.h"
-
-    typedef struct msg_envs_obj {
-
-        unsigned long long timeStamp;
-        unsigned int fS;
-        envs_obj * envs;
-
-    } msg_envs_obj;
-
-    typedef struct msg_envs_cfg {
-
-        unsigned int halfFrameSize;
-        unsigned int nChannels;
-        unsigned int fS;
-
-    } msg_envs_cfg;
-
-    msg_envs_obj * msg_envs_construct(const msg_envs_cfg * msg_envs_config);
-
-    void msg_envs_destroy(msg_envs_obj * obj);
-
-    void msg_envs_copy(msg_envs_obj * dest, const msg_envs_obj * src);
-
-    void msg_envs_zero(msg_envs_obj * obj);
-
-    unsigned int msg_envs_isZero(const msg_envs_obj * obj);
-
-    msg_envs_cfg * msg_envs_cfg_construct(void);
-
-    void msg_envs_cfg_destroy(msg_envs_cfg * msg_envs_config);
-
-    void msg_envs_cfg_printf(const msg_envs_cfg * msg_envs_config);
-
-#endif
\ No newline at end of file
index 109c2a778b6ac3f3737634542912ed10704f8aa1..779ee08551279ec7cc26db1611751a9f041c65fd 100644 (file)
@@ -61,7 +61,7 @@
 
         cfg->hopSize = 0;
         cfg->nChannels = 0;
-        cfg->fS;
+        cfg->fS = 0;
 
         return cfg;
 
diff --git a/src/message/msg_xcorrs.c b/src/message/msg_xcorrs.c
deleted file mode 100644 (file)
index 5aed415..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-    
-    #include "msg_xcorrs.h"
-
-    msg_xcorrs_obj * msg_xcorrs_construct(const msg_xcorrs_cfg * msg_xcorrs_config) {
-
-        msg_xcorrs_obj * obj;
-
-        obj = (msg_xcorrs_obj *) malloc(sizeof(msg_xcorrs_obj));
-
-        obj->timeStamp = 0;
-        obj->fS = 0;
-        obj->xcorrs = xcorrs_construct_zero(msg_xcorrs_config->nPairs, msg_xcorrs_config->frameSize);
-
-        return obj;
-
-    }
-
-    void msg_xcorrs_destroy(msg_xcorrs_obj * obj) {
-
-        xcorrs_destroy(obj->xcorrs);
-        free((void *) obj);
-
-    }
-
-    void msg_xcorrs_copy(msg_xcorrs_obj * dest, const msg_xcorrs_obj * src) {
-
-        dest->timeStamp = src->timeStamp;
-        dest->fS = src->fS;
-        xcorrs_copy(dest->xcorrs, src->xcorrs);
-
-    }
-
-    void msg_xcorrs_zero(msg_xcorrs_obj * obj) {
-
-        obj->timeStamp = 0;
-        obj->fS = 0;
-        xcorrs_zero(obj->xcorrs);
-
-    }
-
-    unsigned int msg_xcorrs_isZero(const msg_xcorrs_obj * obj) {
-
-        unsigned int rtnValue;
-
-        if (obj->timeStamp == 0) {
-            rtnValue = 1;
-        }
-        else {
-            rtnValue = 0;
-        }
-
-        return rtnValue;
-
-    }
-
-    msg_xcorrs_cfg * msg_xcorrs_cfg_construct(void) {
-
-        msg_xcorrs_cfg * cfg;
-
-        cfg = (msg_xcorrs_cfg *) malloc(sizeof(msg_xcorrs_cfg));
-
-        cfg->frameSize = 0;
-        cfg->nPairs = 0;
-        cfg->fS = 0;
-
-        return cfg;
-
-    }
-
-    void msg_xcorrs_cfg_destroy(msg_xcorrs_cfg * msg_xcorrs_config) {
-
-        free((void *) msg_xcorrs_config);
-
-    }
-
-    void msg_xcorrs_cfg_printf(const msg_xcorrs_cfg * msg_xcorrs_config) {
-
-        if (msg_xcorrs_config != NULL) {
-
-            printf("frameSize = %u\n", msg_xcorrs_config->frameSize);
-            printf("nPairs = %u\n", msg_xcorrs_config->nPairs);
-            printf("fS = %u\n", msg_xcorrs_config->fS);
-
-        }
-        else {
-
-            printf("(null)\n");
-
-        }       
-
-    }
\ No newline at end of file
diff --git a/src/message/msg_xcorrs.h b/src/message/msg_xcorrs.h
deleted file mode 100644 (file)
index 24962ef..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef __ODAS_MESSAGE_XCORRS
-#define __ODAS_MESSAGE_XCORRS
-
-    #include <stdlib.h>
-
-    #include "../signal/xcorr.h"
-
-    typedef struct msg_xcorrs_obj {
-
-        unsigned long long timeStamp;
-        unsigned int fS;
-        xcorrs_obj * xcorrs;
-
-    } msg_xcorrs_obj;
-
-    typedef struct msg_xcorrs_cfg {
-
-        unsigned int frameSize;
-        unsigned int nPairs;
-        unsigned int fS;
-
-    } msg_xcorrs_cfg;
-
-    msg_xcorrs_obj * msg_xcorrs_construct(const msg_xcorrs_cfg * msg_xcorrs_config);
-
-    void msg_xcorrs_destroy(msg_xcorrs_obj * obj);
-
-    void msg_xcorrs_copy(msg_xcorrs_obj * dest, const msg_xcorrs_obj * src);
-
-    void msg_xcorrs_zero(msg_xcorrs_obj * obj);
-
-    unsigned int msg_xcorrs_isZero(const msg_xcorrs_obj * obj);
-
-    msg_xcorrs_cfg * msg_xcorrs_cfg_construct(void);
-
-    void msg_xcorrs_cfg_destroy(msg_xcorrs_cfg * msg_xcorrs_config);
-
-    void msg_xcorrs_cfg_printf(const msg_xcorrs_cfg * msg_xcorrs_config);
-
-#endif
\ No newline at end of file
index 7c0bd974f33e36a3035def96e378ecfb850a9b18..25af6a015529a0218d608f6b0ce2c83db2d4e0b3 100644 (file)
@@ -1,10 +1,6 @@
     
     #include "mod_ssl.h"       
 
-    // +----------------------------------------------------------+
-    // | Object - Constructor                                     |
-    // +----------------------------------------------------------+
-
     mod_ssl_obj * mod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config) {
 
         mod_ssl_obj * obj;
diff --git a/src/module/mod_sspf.c b/src/module/mod_sspf.c
deleted file mode 100644 (file)
index a4ea687..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-    
-    #include "mod_sspf.h"
-
-    mod_sspf_obj * mod_sspf_construct(const mod_sspf_cfg * mod_sspf_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config) {
-
-        mod_sspf_obj * obj;
-
-        obj = (mod_sspf_obj *) malloc(sizeof(mod_sspf_obj));
-
-        obj->nSeps = msg_spectra_config->nChannels;
-        obj->halfFrameSize = msg_spectra_config->halfFrameSize;
-
-        obj->alpha = mod_sspf_config->alpha;
-        obj->beta = mod_sspf_config->beta;
-        obj->Ginterf = mod_sspf_config->Ginterf;
-        obj->epsilon = mod_sspf_config->epsilon;
-
-        obj->freq2env = freq2env_construct_zero(obj->halfFrameSize, obj->nSeps);
-        obj->envs = envs_construct_zero(obj->nSeps, obj->halfFrameSize);
-        obj->freq2freq = freq2freq_construct_zero(obj->halfFrameSize, 0, 0, obj->epsilon, obj->alpha, obj->beta, obj->Ginterf);
-
-        obj->in1 = (msg_spectra_obj *) NULL;
-        obj->in2 = (msg_envs_obj *) NULL;
-        obj->in3 = (msg_tracks_obj *) NULL;
-        obj->out = (msg_spectra_obj *) NULL;
-
-        return obj;
-
-    }
-
-    void mod_sspf_destroy(mod_sspf_obj * obj) {
-
-        freq2env_destroy(obj->freq2env);
-        envs_destroy(obj->envs);
-        freq2freq_destroy(obj->freq2freq);
-
-        free((void *) obj);
-
-    }
-
-    int mod_sspf_process(mod_sspf_obj * obj) {
-
-        int rtnValue;
-
-        if ((msg_spectra_isZero(obj->in1) == 0) && (msg_envs_isZero(obj->in2) == 0) && (msg_tracks_isZero(obj->in3) == 0)) {
-
-            if ((obj->in1->timeStamp != obj->in2->timeStamp) || (obj->in1->timeStamp != obj->in3->timeStamp)) {
-                printf("Time stamp mismatch.\n");
-                exit(EXIT_FAILURE);
-            }
-
-            freq2env_process(obj->freq2env, obj->in1->freqs, obj->envs);
-            freq2freq_process_postfilter(obj->freq2freq, obj->in3->tracks, obj->in1->freqs, obj->envs, obj->in2->envs, obj->out->freqs);
-
-            obj->out->timeStamp = obj->in1->timeStamp;
-
-            rtnValue = 0;
-
-        }
-        else {
-
-            msg_spectra_zero(obj->out);
-
-            rtnValue = -1;            
-
-        }
-
-        return rtnValue;
-
-    }
-
-    void mod_sspf_connect(mod_sspf_obj * obj, msg_spectra_obj * in1, msg_envs_obj * in2, msg_tracks_obj * in3, msg_spectra_obj * out) {
-
-        obj->in1 = in1;
-        obj->in2 = in2;
-        obj->in3 = in3;
-        obj->out = out;
-
-    }
-
-    void mod_sspf_disconnect(mod_sspf_obj * obj) {
-
-        obj->in1 = (msg_spectra_obj *) NULL;
-        obj->in2 = (msg_envs_obj *) NULL;
-        obj->in3 = (msg_tracks_obj *) NULL;
-        obj->out = (msg_spectra_obj *) NULL;
-
-    }
-
-    mod_sspf_cfg * mod_sspf_cfg_construct(void) {
-
-        mod_sspf_cfg * cfg;
-
-        cfg = (mod_sspf_cfg *) malloc(sizeof(mod_sspf_cfg));
-
-        cfg->alpha = 0.0f;
-        cfg->beta = 0.0f;
-        cfg->Ginterf = 0.0f;
-        cfg->epsilon = 0.0f;
-
-        return cfg;
-
-    }
-
-    void mod_sspf_cfg_destroy(mod_sspf_cfg * cfg) {
-
-        free((void *) cfg);
-
-    }
-
-    void mod_sspf_cfg_printf(const mod_sspf_cfg * cfg) {
-
-    }
\ No newline at end of file
diff --git a/src/module/mod_sspf.h b/src/module/mod_sspf.h
deleted file mode 100644 (file)
index ee31703..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef __ODAS_MODULE_SSPF
-#define __ODAS_MODULE_SSPF
-
-    #include "../message/msg_envs.h"
-    #include "../message/msg_spectra.h"
-    #include "../message/msg_tracks.h"
-
-    #include "../system/freq2env.h"
-    #include "../signal/env.h"
-    #include "../system/freq2freq.h"
-
-    #include <stdlib.h>
-
-    typedef struct mod_sspf_obj {
-
-        unsigned int nSeps;
-        unsigned int halfFrameSize;
-
-        float alpha;
-        float beta;
-        float Ginterf;
-        float epsilon;
-
-        freq2env_obj * freq2env;
-        envs_obj * envs;
-        freq2freq_obj * freq2freq;
-
-        msg_spectra_obj * in1;
-        msg_envs_obj * in2;
-        msg_tracks_obj * in3;
-        msg_spectra_obj * out;
-
-    } mod_sspf_obj;
-
-    typedef struct mod_sspf_cfg {
-        
-        float alpha;
-        float beta;
-        float Ginterf;
-        float epsilon;
-
-    } mod_sspf_cfg;
-
-    mod_sspf_obj * mod_sspf_construct(const mod_sspf_cfg * mod_sspf_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config);
-
-    void mod_sspf_destroy(mod_sspf_obj * obj);
-
-    int mod_sspf_process(mod_sspf_obj * obj);
-
-    void mod_sspf_connect(mod_sspf_obj * obj, msg_spectra_obj * in1, msg_envs_obj * in2, msg_tracks_obj * in3, msg_spectra_obj * out);
-
-    void mod_sspf_disconnect(mod_sspf_obj * obj);
-
-    mod_sspf_cfg * mod_sspf_cfg_construct(void);
-
-    void mod_sspf_cfg_destroy(mod_sspf_cfg * cfg);
-
-    void mod_sspf_cfg_printf(const mod_sspf_cfg * cfg);
-
-#endif
\ No newline at end of file
index 8f91ef7fb161eff8662171ea67e45f9e0ff2e6af..75ef791bcf85b31f984ca702392c92839b3bedaf 100644 (file)
     
     #include "mod_sss.h"
 
-    mod_sss_obj * mod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config) {
+    mod_sss_obj * mod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config) {
 
         mod_sss_obj * obj;
-
+        
         obj = (mod_sss_obj *) malloc(sizeof(mod_sss_obj));
 
-        obj->nChannels = mod_sss_config->mics->nChannels;
         obj->nSeps = msg_tracks_config->nTracks;
+        obj->nChannels = msg_spectra_config->nChannels;
+        obj->halfFrameSize = msg_spectra_config->halfFrameSize;
 
-        obj->beampatterns_mics = directivity_beampattern_mics(mod_sss_config->mics, mod_sss_config->nThetas);
-        obj->beampatterns_spatialfilter = directivity_beampattern_spatialfilter(mod_sss_config->spatialfilter, mod_sss_config->nThetas);
+        switch(obj->mode_sep) {
 
-        obj->track2gain = track2gain_construct_zero(obj->nSeps,
-                                                    obj->nChannels,
-                                                    mod_sss_config->mics->direction,
-                                                    mod_sss_config->spatialfilter->direction);
+            case 'd':
 
-        obj->gains = gains_construct_zero(obj->nSeps,
-                                          obj->nChannels);
+            break;
 
-        obj->gain2mask = gain2mask_construct_zero(obj->nSeps,
-                                                  obj->nChannels,
-                                                  mod_sss_config->gainMin);
+            case 'g':
 
-        obj->masks = masks_construct_zero(obj->nSeps,
-                                          obj->nChannels);
+            break;
 
-        obj->track2steer = track2steer_construct_zero(obj->nSeps, 
-                                                      obj->nChannels, 
-                                                      msg_spectra_config->halfFrameSize, 
-                                                      mod_sss_config->soundspeed->mu, 
-                                                      mod_sss_config->samplerate->mu,
-                                                      mod_sss_config->mics->mu);
+            case 'm':
 
-        obj->W = steers_construct_zero(msg_spectra_config->halfFrameSize,
-                                       obj->nSeps,
-                                       obj->nChannels);
+            break;
 
-        obj->steer2freq = steer2freq_construct_zero(obj->nSeps, 
-                                                    obj->nChannels, 
-                                                    msg_spectra_config->halfFrameSize);
+            default:
 
-        obj->steer2env = steer2env_construct_zero(obj->nSeps,
-                                                  obj->nChannels,
-                                                  msg_envs_config->halfFrameSize);
+                printf("Invalid separation method.\n");
+                exit(EXIT_FAILURE);
 
-        obj->ids = (unsigned long long *) malloc(sizeof(unsigned long long) * obj->nSeps);
-        memset(obj->ids, 0x00, sizeof(unsigned long long) * obj->nSeps);
+            break;
 
-        obj->in1 = (msg_spectra_obj *) NULL;
-        obj->in2 = (msg_tracks_obj *) NULL;
-        obj->out1 = (msg_spectra_obj *) NULL;
-        obj->out2 = (msg_envs_obj *) NULL;
+        }
 
-        return obj;
+        switch(obj->mode_pf) {
 
-    }
+            case 'm':
 
-    void mod_sss_destroy(mod_sss_obj * obj) {
+            break;
 
-        beampatterns_destroy(obj->beampatterns_mics);
-        beampatterns_destroy(obj->beampatterns_spatialfilter);
+            default:
 
-        track2gain_destroy(obj->track2gain);
-        gains_destroy(obj->gains);
-        gain2mask_destroy(obj->gain2mask);
-        masks_destroy(obj->masks);
+                printf("Invalid post-filtering method.\n");
+                exit(EXIT_FAILURE);
 
-        track2steer_destroy(obj->track2steer);
-        steers_destroy(obj->W);
-        steer2freq_destroy(obj->steer2freq);
-        steer2env_destroy(obj->steer2env);
+            break;
 
-        free((void *) obj);
+        }
 
-    }
 
-    int mod_sss_process(mod_sss_obj * obj) {
 
-        int rtnValue;
-        unsigned int iSep;
+        return obj;
 
-        if ((msg_spectra_isZero(obj->in1) == 0) && (msg_tracks_isZero(obj->in2) == 0)) {
+    }
 
-            if (obj->in1->timeStamp != obj->in2->timeStamp) {
-                printf("Time stamp mismatch.\n");
-                exit(EXIT_FAILURE);
-            }
-
-            // Generate the gain according to each source direction
-            track2gain_process(obj->track2gain,
-                               obj->beampatterns_mics,
-                               obj->beampatterns_spatialfilter,
-                               obj->in2->tracks,
-                               obj->gains);
-
-            // Generate masks from gains
-            gain2mask_process(obj->gain2mask,
-                              obj->gains,
-                              obj->masks);
-           
-            // Generate the demixing matrix W with gains
-            track2steer_process_demixing(obj->track2steer,
-                                         obj->in2->tracks,
-                                         obj->gains,
-                                         obj->masks,
-                                         obj->W);            
-
-            // Apply W to get separated spectra
-            steer2freq_process(obj->steer2freq, 
-                               obj->in2->tracks,
-                               obj->W,
-                               obj->masks,
-                               obj->in1->freqs, 
-                               obj->out1->freqs);
-
-            // Apply W to get separated envelope
-            steer2env_process(obj->steer2env,
-                              obj->in2->tracks, 
-                              obj->W,
-                              obj->masks,
-                              obj->in1->freqs,
-                              obj->out2->envs);
-
-            obj->out1->timeStamp = obj->in1->timeStamp;
-            obj->out2->timeStamp = obj->in1->timeStamp;
-
-            rtnValue = 0;
+    void mod_sss_destroy(mod_sss_obj * obj) {
 
-        }
-        else {
+        free((void *) obj);
 
-            msg_spectra_zero(obj->out1);
-            msg_envs_zero(obj->out2);
+    }
 
-            rtnValue = -1;
+    int mod_sss_process(mod_sss_obj * obj) {
+
+        int rtnValue;
 
-        }
 
         return rtnValue;
 
     }
 
-    void mod_sss_connect(mod_sss_obj * obj, msg_spectra_obj * in1, msg_tracks_obj * in2, msg_spectra_obj * out1, msg_envs_obj * out2) {
-
-        obj->in1 = in1;
-        obj->in2 = in2;
-        obj->out1 = out1;
-        obj->out2 = out2;
+    int mod_sss_process_dds(mod_sss_obj * obj) {
 
     }
 
-    void mod_sss_disconnect(mod_sss_obj * obj) {
-
-        obj->in1 = (msg_spectra_obj *) NULL;
-        obj->in2 = (msg_tracks_obj *) NULL;
-        obj->out1 = (msg_spectra_obj *) NULL;
-        obj->out2 = (msg_envs_obj *) NULL;
+    int mod_sss_process_dgss(mod_sss_obj * obj) {
 
     }
 
-    mod_sss_cfg * mod_sss_cfg_construct(void) {
+    int mod_sss_process_dmvdr(mod_sss_obj * obj) {
 
-        mod_sss_cfg * cfg;
-
-        cfg = (mod_sss_cfg *) malloc(sizeof(mod_sss_cfg));
-
-        cfg->mics = (mics_obj *) NULL;
-        cfg->spatialfilter = (spatialfilter_obj *) NULL;
-        cfg->samplerate = (samplerate_obj *) NULL;
-        cfg->soundspeed = (soundspeed_obj *) NULL;
-
-        cfg->nThetas = 0;
-        cfg->gainMin = 0.0f;
+    }
 
-        return cfg;
+    void mod_sss_connect(mod_sss_obj * obj, msg_spectra_obj * in1, msg_tracks_obj * in2, msg_spectra_obj * out1, msg_spectra_obj * out2) {
 
     }
 
-    void mod_sss_cfg_destroy(mod_sss_cfg * cfg) {
-
-        if (cfg->mics != NULL) {
-            mics_destroy(cfg->mics);
-        }
+    void mod_sss_disconnect(mod_sss_obj * obj) {
 
-        if (cfg->spatialfilter != NULL) {
-            spatialfilter_destroy(cfg->spatialfilter);
-        }
+    }
 
-        if (cfg->samplerate != NULL) {
-            samplerate_destroy(cfg->samplerate);
-        }
+    mod_sss_cfg * mod_sss_cfg_construct(void) {
 
-        if (cfg->soundspeed != NULL) {
-            soundspeed_destroy(cfg->soundspeed);
-        }
+    }
 
-        free((void *) cfg);
+    void mod_sss_cfg_destroy(mod_sss_cfg * cfg) {
 
     }
 
index c6386114e4b58e4edec9ba09c9cc0c1a9b137c6a..b22ada08e081751fb43d14955949ceadbacbb111 100644 (file)
@@ -1,78 +1,57 @@
 #ifndef __ODAS_MODULE_SSS
 #define __ODAS_MODULE_SSS
 
-    #include "../signal/beampattern.h"
-    #include "../signal/freq.h"
-    #include "../signal/gain.h"
-    #include "../signal/mask.h"
-    
-    #include "../system/gain2mask.h"
-    #include "../system/track2gain.h"
-    #include "../system/freq2freq.h"
-    #include "../system/track2steer.h"
-    #include "../system/steer2env.h"
-    #include "../system/steer2freq.h"
-
     #include "../general/mic.h"
     #include "../general/samplerate.h"
     #include "../general/soundspeed.h"
     #include "../general/spatialfilter.h"
 
-    #include "../init/directivity.h"
-
-    #include "../message/msg_envs.h"
     #include "../message/msg_spectra.h"
     #include "../message/msg_tracks.h"
 
+    #include "../system/track2steer.h"
+
     #include <stdlib.h>
+    #include <string.h>
 
     typedef struct mod_sss_obj {
 
-        unsigned int halfFrameSize;
-        unsigned int nChannels;
         unsigned int nSeps;
+        unsigned int nChannels;
+        unsigned int halfFrameSize;
 
-        beampatterns_obj * beampatterns_mics;
-        beampatterns_obj * beampatterns_spatialfilter;
-
-        track2gain_obj * track2gain;
-        gains_obj * gains;
-        gain2mask_obj * gain2mask;
-        masks_obj * masks;
-
-        track2steer_obj * track2steer;
-        steers_obj * W;
-        steer2freq_obj * steer2freq;
-        steer2env_obj * steer2env;
-
-        msg_spectra_obj * in1;
-        msg_tracks_obj * in2;
-        msg_spectra_obj * out1;
-        msg_envs_obj * out2;
+        char mode_sep;
+        char mode_pf;
 
-        unsigned long long * ids;
+        track2steer_obj * dds_track2steer;
 
     } mod_sss_obj;
 
     typedef struct mod_sss_cfg {
-        
+
+        char mode_sep;
+        char mode_pf;
+
         mics_obj * mics;
         samplerate_obj * samplerate;
-        soundspeed_obj * soundspeed; 
-        spatialfilter_obj * spatialfilter;
-
-        unsigned int nThetas;
-        float gainMin; 
+        soundspeed_obj * soundspeed;
+        spatialfilter_obj * spatialfilter;        
 
     } mod_sss_cfg;
 
-    mod_sss_obj * mod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config, const msg_envs_cfg * msg_envs_config);
+    mod_sss_obj * mod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_tracks_cfg * msg_tracks_config, const msg_spectra_cfg * msg_spectra_config);
 
     void mod_sss_destroy(mod_sss_obj * obj);
 
     int mod_sss_process(mod_sss_obj * obj);
 
-    void mod_sss_connect(mod_sss_obj * obj, msg_spectra_obj * in1, msg_tracks_obj * in2, msg_spectra_obj * out1, msg_envs_obj * out2);
+    int mod_sss_process_dds(mod_sss_obj * obj);
+
+    int mod_sss_process_dgss(mod_sss_obj * obj);
+
+    int mod_sss_process_dmvdr(mod_sss_obj * obj);
+
+    void mod_sss_connect(mod_sss_obj * obj, msg_spectra_obj * in1, msg_tracks_obj * in2, msg_spectra_obj * out1, msg_spectra_obj * out2);
 
     void mod_sss_disconnect(mod_sss_obj * obj);
 
diff --git a/src/signal/env.c b/src/signal/env.c
deleted file mode 100644 (file)
index 134b6cd..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-    
-    #include "env.h"
-
-    envs_obj * envs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize) {
-
-        envs_obj * obj;
-        unsigned int iSignal;
-
-        obj = (envs_obj *) malloc(sizeof(envs_obj));
-
-        obj->nSignals = nSignals;
-        obj->halfFrameSize = halfFrameSize;
-        
-        obj->array = (float **) malloc(sizeof(float *) * nSignals);
-        for (iSignal = 0; iSignal < nSignals; iSignal++) {
-            obj->array[iSignal] = (float *) malloc(sizeof(float) * halfFrameSize);
-            memset(obj->array[iSignal], 0x00, halfFrameSize * sizeof(float));
-        }
-
-        return obj;
-
-    }
-
-    envs_obj * envs_clone(const envs_obj * obj) {
-
-        envs_obj * clone;
-        unsigned int iSignal;
-
-        clone = (envs_obj *) malloc(sizeof(envs_obj));
-
-        clone->nSignals = obj->nSignals;
-        clone->halfFrameSize = obj->halfFrameSize;
-
-        clone->array = (float **) malloc(sizeof(float *) * obj->nSignals);
-        for (iSignal = 0; iSignal < obj->nSignals; iSignal++) {
-            clone->array[iSignal] = (float *) malloc(sizeof(float) * obj->halfFrameSize);
-            memcpy(clone->array[iSignal], obj->array[iSignal], obj->halfFrameSize * sizeof(float));
-        }
-
-        return clone;
-
-    }
-
-    void envs_copy(envs_obj * dest, const envs_obj * src) {
-
-        unsigned int iSignal;
-
-        for (iSignal = 0; iSignal < src->nSignals; iSignal++) {
-            memcpy(dest->array[iSignal], src->array[iSignal], src->halfFrameSize * sizeof(float));
-        }
-
-    }
-
-    void envs_zero(envs_obj * obj) {
-
-        unsigned int iSignal;
-
-        for (iSignal = 0; iSignal < obj->nSignals; iSignal++) {
-            memset(obj->array[iSignal], 0x00, obj->halfFrameSize * sizeof(float));
-        }
-
-    }
-
-    void envs_destroy(envs_obj * obj) {
-
-        unsigned int iSignal;
-
-        for (iSignal = 0; iSignal < obj->nSignals; iSignal++) {
-            free((void *) obj->array[iSignal]);
-        }
-        free((void *) obj->array);
-
-        free((void *) obj);
-
-    }
-
-    void envs_printf(const envs_obj * obj) {
-
-        unsigned int iSignal;
-        unsigned int iSample;
-
-        for (iSignal = 0; iSignal < obj->nSignals; iSignal++) {
-
-            printf("(%04u): ",iSignal);
-
-            for (iSample = 0; iSample < obj->halfFrameSize; iSample++) {
-
-                printf("%+1.5f ", obj->array[iSignal][iSample]);
-
-                if ((((iSample+1) % 16) == 0) && ((iSample+1)!=obj->halfFrameSize)) {
-                    printf("\n        ");
-                }
-
-            }
-
-            printf("\n");
-
-        }   
-
-    }
\ No newline at end of file
diff --git a/src/signal/env.h b/src/signal/env.h
deleted file mode 100644 (file)
index 7803ec2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef __ODAS_SIGNAL_ENV
-#define __ODAS_SIGNAL_ENV
-
-    #include <stdlib.h>
-    #include <string.h>
-    #include <stdio.h>
-
-    typedef struct envs_obj {
-
-        unsigned int nSignals;
-        unsigned int halfFrameSize;
-        float ** array;
-
-    } envs_obj;
-
-    envs_obj * envs_construct_zero(const unsigned int nSignals, const unsigned int halfFrameSize);
-
-    envs_obj * envs_clone(const envs_obj * obj);
-
-    void envs_copy(envs_obj * dest, const envs_obj * src);
-
-    void envs_zero(envs_obj * obj);
-
-    void envs_destroy(envs_obj * obj);
-
-    void envs_printf(const envs_obj * obj);
-
-#endif
\ No newline at end of file
index c33d3035d5b00a1f1a55bc422e6ff47c4a8b72cd..7d24d71f0979a5b461a4ca9c8d2c07de5e57cdfb 100644 (file)
 
         switch (obj->format->type) {
             
-            case format_bin08: break;
-            case format_bin16: break;
-            case format_bin24: break;
-            case format_bin32: break;
+            case format_binary_int08: break;
+            case format_binary_int16: break;
+            case format_binary_int24: break;
+            case format_binary_int32: break;
             default:
 
                 printf("Invalid format.\n");
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                // Empty
+
+            break;
+
             case interface_file:
 
                 obj->fp = fopen(obj->interface->fileName, "wb");
 
             case interface_socket:
 
-                //struct sockaddr_in sserver;
-                //char * smessage;
-                //int sid;
-
                 printf("Not implemented yet.\n");
                 exit(EXIT_FAILURE);
 
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                // Empty
+
+            break;
+
             case interface_file:
 
                 fclose(obj->fp);
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                rtnValue = snk_hops_process_blackhole(obj);
+
+            break;  
+
             case interface_file:
 
                 rtnValue = snk_hops_process_file(obj);
 
     }
 
+    int snk_hops_process_blackhole(snk_hops_obj * obj) {
+
+        int rtnValue;
+
+        if (obj->in->timeStamp != 0) {
+
+            rtnValue = 0;
+
+        }
+        else {
+
+            rtnValue = -1;
+
+        }
+
+        return rtnValue;
+
+    }
+
     int snk_hops_process_file(snk_hops_obj * obj) {
 
         unsigned int iSample;
 
             switch (obj->format->type) {
 
-                case format_bin08: nBytes = 1; break;
-                case format_bin16: nBytes = 2; break;
-                case format_bin24: nBytes = 3; break;
-                case format_bin32: nBytes = 4; break;
+                case format_binary_int08: nBytes = 1; break;
+                case format_binary_int16: nBytes = 2; break;
+                case format_binary_int24: nBytes = 3; break;
+                case format_binary_int32: nBytes = 4; break;
 
             }
 
index 0cbdca6dd055f3b4220745c80efbe767a20b1f61..990c41a81fb565457133dee52c8b8240c836e78d 100644 (file)
@@ -55,6 +55,8 @@
 
     int snk_hops_process(snk_hops_obj * obj);
 
+    int snk_hops_process_blackhole(snk_hops_obj * obj);
+
     int snk_hops_process_file(snk_hops_obj * obj);
 
     int snk_hops_process_socket(snk_hops_obj * obj);
index 885387997a0494afa23d155874a2dbefed02e291..2da9332792705783caea37ba71a79dd26f133ac6 100644 (file)
@@ -17,8 +17,8 @@
 
         switch (obj->format->type) {
             
-            case format_json: break;
-            case format_float: break;
+            case format_text_json: break;
+            case format_binary_float: break;
             default:
 
                 printf("Invalid format.\n");
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                // Empty
+
+            break;
+
             case interface_file:
 
                 obj->fp = fopen(obj->interface->fileName, "wb");
 
             break;
 
+            case interface_terminal:
+
+                // Empty
+
+            break;
+
             default:
 
                 printf("Invalid interface type.\n");
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                // Empty
+
+            break;
+
             case interface_file:
 
                 fclose(obj->fp);
 
             break;
 
+            case interface_terminal:
+
+                // Empty
+
+            break;
+
             default:
 
                 printf("Invalid interface type.\n");
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                rtnValue = snk_pots_process_blackhole(obj);
+
+            break;
+
             case interface_file:
 
                 rtnValue = snk_pots_process_file(obj);
 
             break;
 
+            case interface_terminal:
+
+                rtnValue = snk_pots_process_terminal(obj);
+
+            break;
+
             default:
 
                 printf("Invalid interface type.\n");
 
     }
 
+    int snk_pots_process_blackhole(snk_pots_obj * obj) {
+
+        int rtnValue;
+
+        if (obj->in->timeStamp != 0) {
+
+            rtnValue = 0;
+
+        }
+        else {
+
+            rtnValue = -1;
+
+        }
+
+        return rtnValue;
+
+    }
+
     int snk_pots_process_file(snk_pots_obj * obj) {
 
         int rtnValue;
 
             switch(obj->format->type) {
 
-                case format_float:
+                case format_binary_float:
 
                     fwrite(obj->in->pots->array, sizeof(float), 4 * obj->in->pots->nPots, obj->fp);
 
 
             switch(obj->format->type) {
 
-                case format_json:
+                case format_text_json:
 
                     obj->smessage[0] = 0x00;
 
 
     }
 
+    int snk_pots_process_terminal(snk_pots_obj * obj) {
+
+        int rtnValue;
+        unsigned int iPot;
+
+        if (obj->in->timeStamp != 0) {
+
+            switch(obj->format->type) {
+
+                case format_text_json:
+
+                    printf("{\n");
+                    printf("    \"timeStamp\": %llu,\n",obj->in->timeStamp);
+                    printf("    \"src\": [\n");
+
+                    for (iPot = 0; iPot < obj->nPots; iPot++) {
+
+                        printf("        { \"x\": %1.3f, \"y\": %1.3f, \"z\": %1.3f, \"E\": %1.3f }",
+                                obj->in->pots->array[iPot*4+0], 
+                                obj->in->pots->array[iPot*4+1], 
+                                obj->in->pots->array[iPot*4+2],
+                                obj->in->pots->array[iPot*4+3]);
+
+                        if (iPot != (obj->nPots - 1)) {
+
+                            printf(",");
+
+                        }
+
+                        printf("\n");
+
+                    }
+                    
+                    printf("    ]\n");
+                    printf("}\n");
+
+                    rtnValue = 0;
+
+                break;               
+
+            }
+
+        }
+        else {
+
+            rtnValue = -1;
+
+        }
+
+        return rtnValue;           
+
+    }
+
+
     snk_pots_cfg * snk_pots_cfg_construct(void) {
 
         snk_pots_cfg * cfg;
index 706e95dea85e35e5176b089b5485ed1ad4a861d5..e6e68e9ff76eff37f4b074583a03824d661bad1a 100644 (file)
 
     int snk_pots_process(snk_pots_obj * obj);
 
+    int snk_pots_process_blackhole(snk_pots_obj * obj);
+
     int snk_pots_process_file(snk_pots_obj * obj);
 
     int snk_pots_process_socket(snk_pots_obj * obj);
 
+    int snk_pots_process_terminal(snk_pots_obj * obj);
+
     snk_pots_cfg * snk_pots_cfg_construct(void);
 
     void snk_pots_cfg_destroy(snk_pots_cfg * snk_pots_config);
index 6dd3cfd68726e656f2a1d801ec81787bc5ce22bc..e8ae83f1c8bec67e5dee40a2f4d2aa4291015161 100644 (file)
@@ -16,7 +16,7 @@
 
         switch (obj->format->type) {
             
-            case format_float: break;
+            case format_binary_float: break;
             default:
 
                 printf("Invalid format.\n");
 
                     switch (obj->format->type) {
                         
-                        case format_float:
+                        case format_binary_float:
 
                             fwrite(&sampleReal, sizeof(float), 1, obj->fp);
                             fwrite(&sampleImag, sizeof(float), 1, obj->fp);
index 821c9eee97bf500fadba3fe5b7a8bda7b02d7421..7387bb120a7caea97dc99263e5b129677a4dbf8c 100644 (file)
@@ -17,8 +17,8 @@
 
         switch (obj->format->type) {
             
-            case format_json: break;
-            case format_float: break;
+            case format_text_json: break;
+            case format_binary_float: break;
             default:
 
                 printf("Invalid format.\n");
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                // Empty
+
+            break;
+
             case interface_file:
 
                 obj->fp = fopen(obj->interface->fileName, "wb");
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                // Empty
+
+            break;
+
             case interface_file:
 
                 fclose(obj->fp);
 
             case interface_terminal:
 
-                // (Empty)
+                // Empty
 
             break;
 
 
         switch(obj->interface->type) {
 
+            case interface_blackhole:
+
+                rtnValue = snk_tracks_process_blackhole(obj);
+
+            break;
+
             case interface_file:
 
                 rtnValue = snk_tracks_process_file(obj);
 
     }
 
+    int snk_tracks_process_blackhole(snk_tracks_obj * obj) {
+
+        int rtnValue;
+
+        if (obj->in->timeStamp != 0) {
+
+            rtnValue = 0;
+
+        }
+        else {
+
+            rtnValue = -1;
+
+        }
+
+        return rtnValue;          
+
+    }
+
     int snk_tracks_process_file(snk_tracks_obj * obj) {
 
         int rtnValue;
 
             switch(obj->format->type) {
 
-                case format_float:
+                case format_binary_float:
 
                     fwrite(obj->in->tracks->ids, sizeof(unsigned long long), obj->in->tracks->nTracks, obj->fp);
                     fwrite(obj->in->tracks->array, sizeof(float), 3 * obj->in->tracks->nTracks, obj->fp);
 
             switch(obj->format->type) {
 
-                case format_json:
+                case format_text_json:
 
                     obj->smessage[0] = 0x00;
 
 
                         sprintf(obj->smessage,"%s        { \"id\": %llu, \"x\": %1.3f, \"y\": %1.3f, \"z\": %1.3f }", obj->smessage, 
                                 obj->in->tracks->ids[iTrack],
-                                obj->in->tracks->array[iTrack*3+0], obj->in->tracks->array[iTrack*3+1], obj->in->tracks->array[iTrack*3+2]);
+                                obj->in->tracks->array[iTrack*3+0], 
+                                obj->in->tracks->array[iTrack*3+1], 
+                                obj->in->tracks->array[iTrack*3+2]);
 
                         if (iTrack != (obj->nTracks - 1)) {
 
 
             switch(obj->format->type) {
 
-                case format_json:
+                case format_text_json:
 
                     printf("{\n");
                     printf("    \"timeStamp\": %llu,\n",obj->in->timeStamp);
index 0e5b0590c5d103226e2255a22a8103a8e980cbd1..9685d96ba50d3407d3b3312de1bd44321735a5c5 100644 (file)
@@ -55,6 +55,8 @@
 
     int snk_tracks_process(snk_tracks_obj * obj);
 
+    int snk_tracks_process_blackhole(snk_tracks_obj * obj);
+
     int snk_tracks_process_file(snk_tracks_obj * obj);
 
     int snk_tracks_process_socket(snk_tracks_obj * obj);
diff --git a/src/sink/snk_xcorrs.c b/src/sink/snk_xcorrs.c
deleted file mode 100644 (file)
index 8b4ea54..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-    
-    #include "snk_xcorrs.h"
-
-    snk_xcorrs_obj * snk_xcorrs_construct(const snk_xcorrs_cfg * snk_xcorrs_config, const msg_xcorrs_cfg * msg_xcorrs_config) {
-
-        snk_xcorrs_obj * obj;
-
-        obj = (snk_xcorrs_obj *) malloc(sizeof(snk_xcorrs_obj));
-
-        obj->frameSize = msg_xcorrs_config->frameSize;
-        obj->nPairs = msg_xcorrs_config->nPairs;
-        obj->fS = msg_xcorrs_config->fS;
-        
-        obj->format = format_clone(snk_xcorrs_config->format);
-        obj->interface = interface_clone(snk_xcorrs_config->interface);
-
-        switch (obj->format->type) {
-            
-            case format_float: break;
-            default:
-
-                printf("Invalid format.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-        obj->in = (msg_xcorrs_obj *) NULL;
-
-        return obj;
-
-    }
-
-    void snk_xcorrs_destroy(snk_xcorrs_obj * obj) {
-
-        format_destroy(obj->format);
-        interface_destroy(obj->interface);
-
-        free((void *) obj);
-
-    }
-
-    void snk_xcorrs_connect(snk_xcorrs_obj * obj, msg_xcorrs_obj * in) {
-
-        obj->in = in;
-
-    }
-
-    void snk_xcorrs_disconnect(snk_xcorrs_obj * obj) {
-
-        obj->in = (msg_xcorrs_obj *) NULL;
-
-    }
-
-    int snk_xcorrs_open(snk_xcorrs_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                obj->fp = fopen(obj->interface->fileName, "wb");
-
-            break;
-
-            case interface_socket:
-
-                printf("Not implemented yet.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;           
-
-        }
-
-    }
-
-    int snk_xcorrs_close(snk_xcorrs_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                fclose(obj->fp);
-
-            break;
-
-            case interface_socket:
-
-                printf("Not implemented yet.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-    }
-
-    int snk_xcorrs_process(snk_xcorrs_obj * obj) {
-
-        int rtnValue;
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                rtnValue = snk_xcorrs_process_file(obj);
-
-            break;
-
-            case interface_socket:
-
-                rtnValue = snk_xcorrs_process_socket(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-        return rtnValue;
-
-    }
-
-    int snk_xcorrs_process_file(snk_xcorrs_obj * obj) {
-
-        unsigned int iSample;
-        unsigned int iPair;
-        float sample;
-        float sampleImag;
-        int rtnValue;
-
-        if (obj->in->timeStamp != 0) {
-
-            for (iSample = 0; iSample < obj->frameSize; iSample++) {
-                
-                for (iPair = 0; iPair < obj->nPairs; iPair++) {
-
-                    sample = obj->in->xcorrs->array[iPair][iSample];
-
-                    switch (obj->format->type) {
-                        
-                        case format_float:
-
-                            fwrite(&sample, sizeof(float), 1, obj->fp);
-
-                        break;
-
-                    }
-
-                }
-
-            }
-
-            rtnValue = 0;
-
-        }
-        else {
-
-            rtnValue = -1;
-
-        }
-
-        return rtnValue;
-
-    }
-
-    int snk_xcorrs_process_socket(snk_xcorrs_obj * obj) {
-
-        printf("Not implemented\n");
-        exit(EXIT_FAILURE);
-
-    }
-
-    snk_xcorrs_cfg * snk_xcorrs_cfg_construct(void) {
-
-        snk_xcorrs_cfg * cfg;
-
-        cfg = (snk_xcorrs_cfg *) malloc(sizeof(snk_xcorrs_cfg));
-
-        cfg->fS = 0;
-        cfg->format = (format_obj *) NULL;
-        cfg->interface = (interface_obj *) NULL;
-
-        return cfg;
-
-    }
-
-    void snk_xcorrs_cfg_destroy(snk_xcorrs_cfg * snk_xcorrs_config) {
-
-        if (snk_xcorrs_config->format != NULL) {
-            format_destroy(snk_xcorrs_config->format);
-        }
-        if (snk_xcorrs_config->interface != NULL) {
-            interface_destroy(snk_xcorrs_config->interface);
-        }
-
-        free((void *) snk_xcorrs_config);
-
-    }
\ No newline at end of file
diff --git a/src/sink/snk_xcorrs.h b/src/sink/snk_xcorrs.h
deleted file mode 100644 (file)
index 300c5e3..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __ODAS_SINK_XCORRS
-#define __ODAS_SINK_XCORRS
-
-    #include <stdlib.h>
-    #include <stdio.h>
-    #include <string.h>
-
-    #include "../general/format.h"
-    #include "../general/interface.h"
-    #include "../message/msg_xcorrs.h"
-
-    typedef struct snk_xcorrs_obj {
-
-        unsigned long long timeStamp;
-
-        unsigned int frameSize;
-        unsigned int nPairs;
-        unsigned int fS;
-
-        format_obj * format;
-        interface_obj * interface;
-
-        FILE * fp;
-
-        msg_xcorrs_obj * in;
-
-    } snk_xcorrs_obj;
-
-    typedef struct snk_xcorrs_cfg {
-
-        unsigned int fS;
-        format_obj * format;
-        interface_obj * interface;
-
-    } snk_xcorrs_cfg;
-
-    snk_xcorrs_obj * snk_xcorrs_construct(const snk_xcorrs_cfg * snk_xcorrs_config, const msg_xcorrs_cfg * msg_xcorrs_config);
-
-    void snk_xcorrs_destroy(snk_xcorrs_obj * obj);
-
-    void snk_xcorrs_connect(snk_xcorrs_obj * obj, msg_xcorrs_obj * in);
-
-    void snk_xcorrs_disconnect(snk_xcorrs_obj * obj);
-
-    int snk_xcorrs_open(snk_xcorrs_obj * obj);
-
-    int snk_xcorrs_close(snk_xcorrs_obj * obj);
-
-    int snk_xcorrs_process(snk_xcorrs_obj * obj);
-
-    int snk_xcorrs_process_file(snk_xcorrs_obj * obj);
-
-    int snk_xcorrs_process_socket(snk_xcorrs_obj * obj);
-
-    snk_xcorrs_cfg * snk_xcorrs_cfg_construct(void);
-
-    void snk_xcorrs_cfg_destroy(snk_xcorrs_cfg * snk_xcorrs_config);
-
-#endif
\ No newline at end of file
index 63c2eebeeaf93e9aa6206d28af1c778313220598..0c28b55651585ebcf04959d78d531c293c7b01ed 100644 (file)
@@ -12,7 +12,7 @@
 
         obj->hopSize = msg_hops_config->hopSize;
         obj->nChannels = msg_hops_config->nChannels;
-        obj->fS = src_hops_config->fS;
+        obj->fS = msg_hops_config->fS;
         
         obj->format = format_clone(src_hops_config->format);
         obj->interface = interface_clone(src_hops_config->interface);
 
         switch (obj->format->type) {
             
-            case format_bin08: nBytes = 1; break;
-            case format_bin16: nBytes = 2; break;
-            case format_bin24: nBytes = 3; break;
-            case format_bin32: nBytes = 4; break;
+            case format_binary_int08: nBytes = 1; break;
+            case format_binary_int16: nBytes = 2; break;
+            case format_binary_int24: nBytes = 3; break;
+            case format_binary_int32: nBytes = 4; break;
             default:
 
                 printf("Invalid format.\n");
 
         switch (obj->format->type) {
             
-            case format_bin08:
+            case format_binary_int08:
 
                 format = SND_PCM_FORMAT_S8;
 
             break;
 
-            case format_bin16:
+            case format_binary_int16:
 
                 format = SND_PCM_FORMAT_S16_LE;
 
             break;
 
-            case format_bin24:
+            case format_binary_int24:
 
                 format = SND_PCM_FORMAT_S24_LE;
 
             break;
             
-            case format_bin32:
+            case format_binary_int32:
             
                 format = SND_PCM_FORMAT_S32_LE;
             
 
         switch (obj->format->type) {
 
-            case format_bin08: nBytes = 1; break;
-            case format_bin16: nBytes = 2; break;
-            case format_bin24: nBytes = 3; break;
-            case format_bin32: nBytes = 4; break;
+            case format_binary_int08: nBytes = 1; break;
+            case format_binary_int16: nBytes = 2; break;
+            case format_binary_int24: nBytes = 3; break;
+            case format_binary_int32: nBytes = 4; break;
 
         }
 
 
         switch (obj->format->type) {
 
-            case format_bin08: nBytes = 1; break;
-            case format_bin16: nBytes = 2; break;
-            case format_bin24: nBytes = 3; break;
-            case format_bin32: nBytes = 4; break;
+            case format_binary_int08: nBytes = 1; break;
+            case format_binary_int16: nBytes = 2; break;
+            case format_binary_int24: nBytes = 3; break;
+            case format_binary_int32: nBytes = 4; break;
 
         }
 
 
         cfg = (src_hops_cfg *) malloc(sizeof(src_hops_cfg));
 
-        cfg->fS = 0;
         cfg->format = (format_obj *) NULL;
         cfg->interface = (interface_obj *) NULL;
 
index cba9c7f0171adb4477a68b5c23914b386da1e419..5dbff234c03fb01972e754ce042ce85201e98de1 100644 (file)
@@ -35,7 +35,6 @@
 
     typedef struct src_hops_cfg {
 
-        unsigned int fS;
         format_obj * format;
         interface_obj * interface;
 
diff --git a/src/source/src_pots.c b/src/source/src_pots.c
deleted file mode 100644 (file)
index 5abe1e4..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-    
-    #include "src_pots.h"
-
-    src_pots_obj * src_pots_construct(const src_pots_cfg * src_pots_config, const msg_pots_cfg * msg_pots_config) {
-
-        src_pots_obj * obj;
-        unsigned int nBytes;
-
-        obj = (src_pots_obj *) malloc(sizeof(src_pots_obj));
-
-        obj->timeStamp = 0;
-
-        obj->nPots = msg_pots_config->nPots;
-        obj->fS = src_pots_config->fS;
-        
-        obj->format = format_clone(src_pots_config->format);
-        obj->interface = interface_clone(src_pots_config->interface);
-
-        switch (obj->format->type) {
-            
-            case format_float: break;
-            default:
-
-                printf("Invalid format.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-        obj->buffer = (float *) malloc(sizeof(float) * 4 * obj->nPots);
-
-        obj->out = (msg_pots_obj *) NULL;
-        
-        return obj;
-
-    }
-
-    void src_pots_destroy(src_pots_obj * obj) {
-
-        format_destroy(obj->format);
-        interface_destroy(obj->interface);
-
-        free((void *) obj);
-
-    }
-
-    void src_pots_connect(src_pots_obj * obj, msg_pots_obj * out) {
-
-        obj->out = out;
-
-    }
-
-    void src_pots_disconnect(src_pots_obj * obj) {
-
-        obj->out = (msg_pots_obj *) NULL;
-
-    }
-
-    void src_pots_open(src_pots_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                src_pots_open_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }   
-
-    }
-
-    void src_pots_open_file(src_pots_obj * obj) {
-
-        obj->fp = fopen(obj->interface->fileName, "rb");
-
-    }
-
-    void src_pots_close(src_pots_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                src_pots_close_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-    }
-
-    void src_pots_close_file(src_pots_obj * obj) {
-
-        fclose(obj->fp);
-
-    }
-
-    int src_pots_process(src_pots_obj * obj) {
-
-        int rtnValue;
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                rtnValue = src_pots_process_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;           
-
-        }
-
-        obj->timeStamp++;
-        obj->out->timeStamp = obj->timeStamp;
-
-        return rtnValue;
-
-    }
-
-    int src_pots_process_file(src_pots_obj * obj) {
-
-        unsigned int iPot;
-        int nSamples;
-        int rtnValue;
-
-        memset(obj->buffer, 0x00, sizeof(float) * 4 * obj->nPots);
-        nSamples = fread(obj->buffer, sizeof(float), 4 * obj->nPots, obj->fp);
-
-        for (iPot = 0; iPot < obj->nPots; iPot++) {
-
-            obj->out->pots->array[iPot*4+0] = obj->buffer[iPot*4+0];
-            obj->out->pots->array[iPot*4+1] = obj->buffer[iPot*4+1];
-            obj->out->pots->array[iPot*4+2] = obj->buffer[iPot*4+2];
-            obj->out->pots->array[iPot*4+3] = obj->buffer[iPot*4+3];
-
-        }
-
-        if (nSamples != (4 * obj->nPots)) {
-            
-            rtnValue = -1;    
-
-        }
-        else {
-
-            rtnValue = 0;
-
-        }
-
-        return rtnValue;
-
-    }
-
-    src_pots_cfg * src_pots_cfg_construct(void) {
-
-        src_pots_cfg * cfg;
-
-        cfg = (src_pots_cfg *) malloc(sizeof(src_pots_cfg));
-
-        cfg->fS = 0;
-        cfg->format = (format_obj *) NULL;
-        cfg->interface = (interface_obj *) NULL;
-
-        return cfg;
-
-    }
-
-    void src_pots_cfg_destroy(src_pots_cfg * src_pots_config) {
-
-        if (src_pots_config->format != NULL) {
-            format_destroy(src_pots_config->format);
-        }
-        if (src_pots_config->interface != NULL) {
-            interface_destroy(src_pots_config->interface);
-        }
-
-        free((void *) src_pots_config);
-
-    }
\ No newline at end of file
diff --git a/src/source/src_pots.h b/src/source/src_pots.h
deleted file mode 100644 (file)
index 1c75d13..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef __ODAS_SOURCE_POTS
-#define __ODAS_SOURCE_POTS
-
-    #include <stdlib.h>
-    #include <stdio.h>
-    #include <string.h>
-
-    #include "../general/format.h"
-    #include "../general/interface.h"
-    #include "../message/msg_pots.h"
-    #include "../signal/pot.h"
-    #include "../utils/pcm.h"
-
-    typedef struct src_pots_obj {
-
-        unsigned long long timeStamp;
-
-        unsigned int nPots;
-        unsigned int fS;
-
-        format_obj * format;
-        interface_obj * interface;
-
-        FILE * fp;
-
-        float * buffer;
-
-        msg_pots_obj * out;
-
-    } src_pots_obj;
-
-    typedef struct src_pots_cfg {
-
-        unsigned int fS;
-        format_obj * format;
-        interface_obj * interface;
-
-    } src_pots_cfg;
-
-    src_pots_obj * src_pots_construct(const src_pots_cfg * src_pots_config, const msg_pots_cfg * msg_pots_config);
-
-    void src_pots_destroy(src_pots_obj * obj);
-
-    void src_pots_connect(src_pots_obj * obj, msg_pots_obj * out);
-
-    void src_pots_disconnect(src_pots_obj * obj);
-
-    void src_pots_open(src_pots_obj * obj);
-
-    void src_pots_open_file(src_pots_obj * obj);
-
-    void src_pots_close(src_pots_obj * obj);
-
-    void src_pots_close_file(src_pots_obj * obj);
-
-    int src_pots_process(src_pots_obj * obj);
-
-    int src_pots_process_file(src_pots_obj * obj);
-
-    src_pots_cfg * src_pots_cfg_construct(void);
-
-    void src_pots_cfg_destroy(src_pots_cfg * src_pots_config);
-
-#endif
\ No newline at end of file
diff --git a/src/source/src_spectra.c b/src/source/src_spectra.c
deleted file mode 100644 (file)
index 33580db..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-    
-    #include "src_spectra.h"
-
-    src_spectra_obj * src_spectra_construct(const src_spectra_cfg * src_spectra_config, const msg_spectra_cfg * msg_spectra_config) {
-
-        src_spectra_obj * obj;
-        unsigned int nBytes;
-
-        obj = (src_spectra_obj *) malloc(sizeof(src_spectra_obj));
-
-        obj->timeStamp = 0;
-
-        obj->halfFrameSize = msg_spectra_config->halfFrameSize;
-        obj->nChannels = msg_spectra_config->nChannels;
-        obj->fS = src_spectra_config->fS;
-        
-        obj->format = format_clone(src_spectra_config->format);
-        obj->interface = interface_clone(src_spectra_config->interface);
-
-        switch (obj->format->type) {
-            
-            case format_float: break;
-            default:
-
-                printf("Invalid format.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-        obj->buffer = (float *) malloc(sizeof(float) * obj->halfFrameSize * 2 * obj->nChannels);
-
-        obj->out = (msg_spectra_obj *) NULL;
-        
-        return obj;
-
-    }
-
-    void src_spectra_destroy(src_spectra_obj * obj) {
-
-        free((void *) obj->buffer);
-        format_destroy(obj->format);
-        interface_destroy(obj->interface);
-
-        free((void *) obj);
-
-    }
-
-    void src_spectra_connect(src_spectra_obj * obj, msg_spectra_obj * out) {
-
-        obj->out = out;
-
-    }
-
-    void src_spectra_disconnect(src_spectra_obj * obj) {
-
-        obj->out = (msg_spectra_obj *) NULL;
-
-    }
-
-    void src_spectra_open(src_spectra_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                src_spectra_open_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }   
-
-    }
-
-    void src_spectra_open_file(src_spectra_obj * obj) {
-
-        obj->fp = fopen(obj->interface->fileName, "rb");
-
-    }
-
-    void src_spectra_close(src_spectra_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                src_spectra_close_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-    }
-
-    void src_spectra_close_file(src_spectra_obj * obj) {
-
-        fclose(obj->fp);
-
-    }
-
-    int src_spectra_process(src_spectra_obj * obj) {
-
-        int rtnValue;
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                rtnValue = src_spectra_process_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;           
-
-        }
-
-        obj->timeStamp++;
-        obj->out->timeStamp = obj->timeStamp;
-
-        return rtnValue;
-
-    }
-
-    int src_spectra_process_file(src_spectra_obj * obj) {
-
-        unsigned int iSample;
-        unsigned int iChannel;
-        float sampleReal;
-        float sampleImag;
-        int nSamples;
-        int rtnValue;
-
-        memset(obj->buffer, 0x00, sizeof(float) * obj->halfFrameSize * 2 * obj->nChannels);
-        nSamples = fread(obj->buffer, sizeof(float), obj->halfFrameSize * 2 * obj->nChannels, obj->fp);
-
-        for (iSample = 0; iSample < obj->halfFrameSize; iSample++) {
-
-            for (iChannel = 0; iChannel < obj->nChannels; iChannel++) {
-
-                obj->out->freqs->array[iChannel][iSample*2+0] = obj->buffer[(iSample*2) * obj->nChannels + iChannel + 0];
-                obj->out->freqs->array[iChannel][iSample*2+1] = obj->buffer[(iSample*2) * obj->nChannels + iChannel + 1];
-
-            }
-
-        }
-
-        if (nSamples != (obj->nChannels * obj->halfFrameSize)) {
-            
-            rtnValue = -1;    
-
-        }
-        else {
-
-            rtnValue = 0;
-
-        }
-
-        return rtnValue;
-
-    }
-
-    src_spectra_cfg * src_spectra_cfg_construct(void) {
-
-        src_spectra_cfg * cfg;
-
-        cfg = (src_spectra_cfg *) malloc(sizeof(src_spectra_cfg));
-
-        cfg->fS = 0;
-        cfg->format = (format_obj *) NULL;
-        cfg->interface = (interface_obj *) NULL;
-
-        return cfg;
-
-    }
-
-    void src_spectra_cfg_destroy(src_spectra_cfg * src_spectra_config) {
-
-        if (src_spectra_config->format != NULL) {
-            format_destroy(src_spectra_config->format);
-        }
-        if (src_spectra_config->interface != NULL) {
-            interface_destroy(src_spectra_config->interface);
-        }
-
-        free((void *) src_spectra_config);
-
-    }
\ No newline at end of file
diff --git a/src/source/src_spectra.h b/src/source/src_spectra.h
deleted file mode 100644 (file)
index b2b9f13..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __ODAS_SOURCE_SPECTRA
-#define __ODAS_SOURCE_SPECTRA
-
-    #include <stdlib.h>
-    #include <stdio.h>
-    #include <string.h>
-
-    #include "../general/format.h"
-    #include "../general/interface.h"
-    #include "../general/thread.h"
-    #include "../message/msg_spectra.h"
-    #include "../signal/freq.h"
-    #include "../utils/pcm.h"
-
-    typedef struct src_spectra_obj {
-
-        unsigned long long timeStamp;
-
-        unsigned int halfFrameSize;
-        unsigned int nChannels;
-        unsigned int fS;
-
-        format_obj * format;
-        interface_obj * interface;
-
-        FILE * fp;
-
-        float * buffer;
-
-        msg_spectra_obj * out;
-
-    } src_spectra_obj;
-
-    typedef struct src_spectra_cfg {
-
-        unsigned int fS;
-        format_obj * format;
-        interface_obj * interface;
-
-    } src_spectra_cfg;
-
-    src_spectra_obj * src_spectra_construct(const src_spectra_cfg * src_spectra_config, const msg_spectra_cfg * msg_spectra_config);
-
-    void src_spectra_destroy(src_spectra_obj * obj);
-
-    void src_spectra_connect(src_spectra_obj * obj, msg_spectra_obj * out);
-
-    void src_spectra_disconnect(src_spectra_obj * obj);
-
-    void src_spectra_open(src_spectra_obj * obj);
-
-    void src_spectra_open_file(src_spectra_obj * obj);
-
-    void src_spectra_close(src_spectra_obj * obj);
-
-    void src_spectra_close_file(src_spectra_obj * obj);
-
-    int src_spectra_process(src_spectra_obj * obj);
-
-    int src_spectra_process_file(src_spectra_obj * obj);
-
-    src_spectra_cfg * src_spectra_cfg_construct(void);
-
-    void src_spectra_cfg_destroy(src_spectra_cfg * src_spectra_config);
-
-#endif
\ No newline at end of file
diff --git a/src/source/src_tracks.c b/src/source/src_tracks.c
deleted file mode 100644 (file)
index 42142b4..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-    
-    #include "src_tracks.h"
-
-    src_tracks_obj * src_tracks_construct(const src_tracks_cfg * src_tracks_config, const msg_tracks_cfg * msg_tracks_config) {
-
-        src_tracks_obj * obj;
-        unsigned int nBytes;
-
-        obj = (src_tracks_obj *) malloc(sizeof(src_tracks_obj));
-
-        obj->timeStamp = 0;
-
-        obj->nTracks = msg_tracks_config->nTracks;
-        obj->fS = src_tracks_config->fS;
-        
-        obj->format = format_clone(src_tracks_config->format);
-        obj->interface = interface_clone(src_tracks_config->interface);
-
-        switch (obj->format->type) {
-            
-            case format_float: break;
-            default:
-
-                printf("Invalid format.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-        obj->buffer = (float *) malloc(sizeof(float) * 3 * obj->nTracks);
-
-        obj->out = (msg_tracks_obj *) NULL;
-        
-        return obj;
-
-    }
-
-    void src_tracks_destroy(src_tracks_obj * obj) {
-
-        format_destroy(obj->format);
-        interface_destroy(obj->interface);
-
-        free((void *) obj);
-
-    }
-
-    void src_tracks_connect(src_tracks_obj * obj, msg_tracks_obj * out) {
-
-        obj->out = out;
-
-    }
-
-    void src_tracks_disconnect(src_tracks_obj * obj) {
-
-        obj->out = (msg_tracks_obj *) NULL;
-
-    }
-
-    void src_tracks_open(src_tracks_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                src_tracks_open_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }   
-
-    }
-
-    void src_tracks_open_file(src_tracks_obj * obj) {
-
-        obj->fp = fopen(obj->interface->fileName, "rb");
-
-    }
-
-    void src_tracks_close(src_tracks_obj * obj) {
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                src_tracks_close_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-    }
-
-    void src_tracks_close_file(src_tracks_obj * obj) {
-
-        fclose(obj->fp);
-
-    }
-
-    int src_tracks_process(src_tracks_obj * obj) {
-
-        int rtnValue;
-
-        switch(obj->interface->type) {
-
-            case interface_file:
-
-                rtnValue = src_tracks_process_file(obj);
-
-            break;
-
-            default:
-
-                printf("Invalid interface type.\n");
-                exit(EXIT_FAILURE);
-
-            break;           
-
-        }
-
-        obj->timeStamp++;
-        obj->out->timeStamp = obj->timeStamp;
-
-        return rtnValue;
-
-    }
-
-    int src_tracks_process_file(src_tracks_obj * obj) {
-
-        unsigned int iTrack;
-        int nSamples;
-        int rtnValue;
-
-        memset(obj->buffer, 0x00, sizeof(float) * 3 * obj->nTracks);
-        nSamples = fread(obj->buffer, sizeof(float), 3 * obj->nTracks, obj->fp);
-
-        for (iTrack = 0; iTrack < obj->nTracks; iTrack++) {
-
-            obj->out->tracks->array[iTrack*3+0] = obj->buffer[iTrack*3+0];
-            obj->out->tracks->array[iTrack*3+1] = obj->buffer[iTrack*3+1];
-            obj->out->tracks->array[iTrack*3+2] = obj->buffer[iTrack*3+2];
-
-        }
-
-        if (nSamples != (3 * obj->nTracks)) {
-            
-            rtnValue = -1;    
-
-        }
-        else {
-
-            rtnValue = 0;
-
-        }
-
-        return rtnValue;
-
-    }
-
-    src_tracks_cfg * src_tracks_cfg_construct(void) {
-
-        src_tracks_cfg * cfg;
-
-        cfg = (src_tracks_cfg *) malloc(sizeof(src_tracks_cfg));
-
-        cfg->fS = 0;
-        cfg->format = (format_obj *) NULL;
-        cfg->interface = (interface_obj *) NULL;
-
-        return cfg;
-
-    }
-
-    void src_tracks_cfg_destroy(src_tracks_cfg * src_tracks_config) {
-
-        if (src_tracks_config->format != NULL) {
-            format_destroy(src_tracks_config->format);
-        }
-        if (src_tracks_config->interface != NULL) {
-            interface_destroy(src_tracks_config->interface);
-        }
-
-        free((void *) src_tracks_config);
-
-    }
\ No newline at end of file
diff --git a/src/source/src_tracks.h b/src/source/src_tracks.h
deleted file mode 100644 (file)
index 0ef2659..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef __ODAS_SOURCE_TRACKS
-#define __ODAS_SOURCE_TRACKS
-
-    #include <stdlib.h>
-    #include <stdio.h>
-    #include <string.h>
-
-    #include "../general/format.h"
-    #include "../general/interface.h"
-    #include "../message/msg_tracks.h"
-    #include "../signal/pot.h"
-    #include "../utils/pcm.h"
-
-    typedef struct src_tracks_obj {
-
-        unsigned long long timeStamp;
-
-        unsigned int nTracks;
-        unsigned int fS;
-
-        format_obj * format;
-        interface_obj * interface;
-
-        FILE * fp;
-
-        float * buffer;
-
-        msg_tracks_obj * out;
-
-    } src_tracks_obj;
-
-    typedef struct src_tracks_cfg {
-
-        unsigned int fS;
-        format_obj * format;
-        interface_obj * interface;
-
-    } src_tracks_cfg;
-
-    src_tracks_obj * src_tracks_construct(const src_tracks_cfg * src_tracks_config, const msg_tracks_cfg * msg_tracks_config);
-
-    void src_tracks_destroy(src_tracks_obj * obj);
-
-    void src_tracks_connect(src_tracks_obj * obj, msg_tracks_obj * out);
-
-    void src_tracks_disconnect(src_tracks_obj * obj);
-
-    void src_tracks_open(src_tracks_obj * obj);
-
-    void src_tracks_open_file(src_tracks_obj * obj);
-
-    void src_tracks_close(src_tracks_obj * obj);
-
-    void src_tracks_close_file(src_tracks_obj * obj);
-
-    int src_tracks_process(src_tracks_obj * obj);
-
-    int src_tracks_process_file(src_tracks_obj * obj);
-
-    src_tracks_cfg * src_tracks_cfg_construct(void);
-
-    void src_tracks_cfg_destroy(src_tracks_cfg * src_tracks_config);
-
-#endif
\ No newline at end of file
diff --git a/src/source/src_xcorrs.c b/src/source/src_xcorrs.c
deleted file mode 100644 (file)
index b0fe1e3..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-    
-    #include "src_xcorrs.h"
-
-    src_xcorrs_obj * src_xcorrs_construct(const src_xcorrs_cfg * src_xcorrs_config, const msg_xcorrs_cfg * msg_xcorrs_config) {
-
-        src_xcorrs_obj * obj;
-        unsigned int nBytes;
-
-        obj = (src_xcorrs_obj *) malloc(sizeof(src_xcorrs_obj));
-
-        obj->timeStamp = 0;
-
-        obj->frameSize = msg_spectra_config->frameSize;
-        obj->nPairs = msg_spectra_config->nPairs;
-        obj->fS = src_spectra_config->fS;
-        
-        obj->format = format_clone(src_spectra_config->format);
-        obj->interface = interface_clone(src_spectra_config->interface);
-
-        switch (obj->format->type) {
-            
-            case format_float: break;
-            default:
-
-                printf("Invalid format.\n");
-                exit(EXIT_FAILURE);
-
-            break;
-
-        }
-
-        obj->buffer = (float *) malloc(sizeof(float) * obj->halfFrameSize * 2 * obj->nChannels);
-
-        obj->out = (msg_spectra_obj *) NULL;
-        
-        return obj;
-
-    }
-
-    void src_xcorrs_destroy(src_xcorrs_obj * obj) {
-
-    }
-
-    void src_xcorrs_connect(src_xcorrs_obj * obj, msg_xcorrs_obj * out) {
-
-    }
-
-    void src_xcorrs_disconnect(src_xcorrs_obj * obj) {
-
-    }
-
-    void src_xcorrs_open(src_xcorrs_obj * obj) {
-
-    }
-
-    void src_xcorrs_open_file(src_xcorrs_obj * obj) {
-
-    }
-
-    void src_xcorrs_close(src_xcorrs_obj * obj) {
-
-    }
-
-    void src_xcorrs_close_file(src_xcorrs_obj * obj) {
-
-    }
-
-    int src_xcorrs_process(src_xcorrs_obj * obj) {
-
-    }
-
-    int src_xcorrs_process_file(src_xcorrs_obj * obj) {
-
-    }
-
-    src_xcorrs_cfg * src_xcorrs_cfg_construct(void) {
-
-        src_xcorrs_cfg * cfg;
-
-        cfg = (src_xcorrs_cfg *) malloc(sizeof(src_xcorrs_cfg));
-
-        cfg->fS = 0;
-        cfg->format = (format_obj *) NULL;
-        cfg->interface = (interface_obj *) NULL;
-
-        return cfg;
-
-    }
-
-    void src_xcorrs_cfg_destroy(src_xcorrs_cfg * src_xcorrs_config) {
-
-        if (src_xcorrs_config->format != NULL) {
-            format_destroy(src_xcorrs_config->format);
-        }
-        if (src_xcorrs_config->interface != NULL) {
-            interface_destroy(src_xcorrs_config->interface);
-        }
-
-        free((void *) src_xcorrs_config);
-
-    }
\ No newline at end of file
diff --git a/src/source/src_xcorrs.h b/src/source/src_xcorrs.h
deleted file mode 100644 (file)
index 77db97f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __ODAS_SOURCE_XCORRS
-#define __ODAS_SOURCE_XCORRS
-
-    #include <stdlib.h>
-    #include <stdio.h>
-    #include <string.h>
-
-    #include "../general/format.h"
-    #include "../general/interface.h"
-    #include "../general/thread.h"
-    #include "../message/msg_xcorrs.h"
-    #include "../signal/xcorr.h"
-    #include "../utils/pcm.h"
-
-    typedef struct src_xcorrs_obj {
-
-        unsigned long long timeStamp;
-
-        unsigned int frameSize;
-        unsigned int nPairs;
-        unsigned int fS;
-
-        format_obj * format;
-        interface_obj * interface;
-
-        FILE * fp;
-
-        float * buffer;
-
-        msg_xcorrs_obj * out;
-
-    } src_xcorrs_obj;
-
-    typedef struct src_xcorrs_cfg {
-
-        unsigned int fS;
-        format_obj * format;
-        interface_obj * interface;
-
-    } src_xcorrs_cfg;
-
-    src_xcorrs_obj * src_xcorrs_construct(const src_xcorrs_cfg * src_xcorrs_config, const msg_xcorrs_cfg * msg_xcorrs_config);
-
-    void src_xcorrs_destroy(src_xcorrs_obj * obj);
-
-    void src_xcorrs_connect(src_xcorrs_obj * obj, msg_xcorrs_obj * out);
-
-    void src_xcorrs_disconnect(src_xcorrs_obj * obj);
-
-    void src_xcorrs_open(src_xcorrs_obj * obj);
-
-    void src_xcorrs_open_file(src_xcorrs_obj * obj);
-
-    void src_xcorrs_close(src_xcorrs_obj * obj);
-
-    void src_xcorrs_close_file(src_xcorrs_obj * obj);
-
-    int src_xcorrs_process(src_xcorrs_obj * obj);
-
-    int src_xcorrs_process_file(src_xcorrs_obj * obj);
-
-    src_xcorrs_cfg * src_xcorrs_cfg_construct(void);
-
-    void src_xcorrs_cfg_destroy(src_xcorrs_cfg * src_xcorrs_config);
-
-#endif
\ No newline at end of file
diff --git a/src/system/freq2env.c b/src/system/freq2env.c
deleted file mode 100644 (file)
index 295af65..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-    
-    #include "freq2env.h"
-
-    freq2env_obj * freq2env_construct_zero(const unsigned int halfFrameSize, const unsigned int nSignals) {
-
-        freq2env_obj * obj;
-
-        obj = (freq2env_obj *) malloc(sizeof(freq2env_obj));
-
-        obj->halfFrameSize = halfFrameSize;
-        obj->nSignals = nSignals;
-
-        return obj;
-
-    }
-
-    void freq2env_destroy(freq2env_obj * obj) {
-
-        free((void *) obj);
-
-    }
-
-    void freq2env_process(freq2env_obj * obj, const freqs_obj * freqs, envs_obj * envs) {
-
-        unsigned int iSignal;
-        unsigned int iSample;
-
-        float real;
-        float imag;
-        float env;
-
-        for (iSignal = 0; iSignal < obj->nSignals; iSignal++) {
-
-            for (iSample = 0; iSample < obj->halfFrameSize; iSample++) {
-
-                real = freqs->array[iSignal][iSample * 2 + 0];
-                imag = freqs->array[iSignal][iSample * 2 + 1];
-
-                env = real * real + imag * imag;
-
-                envs->array[iSignal][iSample] = sqrtf(env);
-
-            }
-
-        }
-
-    }
\ No newline at end of file
diff --git a/src/system/freq2env.h b/src/system/freq2env.h
deleted file mode 100644 (file)
index aff3e63..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __ODAS_SYSTEM_FREQ2ENV
-#define __ODAS_SYSTEM_FREQ2ENV
-
-    #include <stdlib.h>
-    #include <math.h>
-
-    #include "../signal/freq.h"
-    #include "../signal/env.h"
-    
-    typedef struct freq2env_obj {
-
-        unsigned int nSignals;
-        unsigned int halfFrameSize;
-
-    } freq2env_obj;
-
-    freq2env_obj * freq2env_construct_zero(const unsigned int halfFrameSize, const unsigned int nSignals);
-
-    void freq2env_destroy(freq2env_obj * obj);
-
-    void freq2env_process(freq2env_obj * obj, const freqs_obj * freqs, envs_obj * envs);
-
-#endif
\ No newline at end of file
index ef89bd12388ea0f0c7c1b6921ded6d279c7e6261..21f55c6073f9988abd9bdd75b1c7ebb396e70531 100644 (file)
 
     }
 
-    void freq2freq_process_postfilter(freq2freq_obj * obj, const tracks_obj * tracks, const freqs_obj * freqsSeps, const envs_obj * envsSeps, const envs_obj * envsDiffuse, freqs_obj * freqsPosts) {
-
-        unsigned int iSignal;
-        unsigned int iSample;
-
-        float ratio;
-        float gain;
-        float real;
-        float imag;
-
-        for (iSignal = 0; iSignal < freqsSeps->nSignals; iSignal++) {
-
-            if (tracks->ids[iSignal] != 0) {
-
-                for (iSample = 0; iSample < obj->halfFrameSize; iSample++) {
-
-                    ratio = envsSeps->array[iSignal][iSample] / (envsDiffuse->array[iSignal][iSample] + obj->epsilon);
-
-                    gain = (1.0f - obj->Ginterf) / (1.0f + expf(-1.0f * obj->alpha * (ratio - obj->beta))) + obj->Ginterf;
-
-                    real = freqsSeps->array[iSignal][iSample * 2 + 0];
-                    imag = freqsSeps->array[iSignal][iSample * 2 + 1];
-
-                    freqsPosts->array[iSignal][iSample * 2 + 0] = gain * real;
-                    freqsPosts->array[iSignal][iSample * 2 + 1] = gain * imag;
-
-                }
-
-            }
-            else {
-
-                memset(freqsPosts->array[iSignal], 0x00, sizeof(float) * obj->halfFrameSize * 2);
-
-            }
-
-        }
-
-    }
-
     void freq2freq_process_interpolate(freq2freq_obj * obj, const freqs_obj * freqs, const freqs_obj * freqsInterp) {
 
         unsigned int iSignal;
index ee759a5b6e2d804bf9c1588d28f7349dd94a7b68..a3816bca79e4aaa1a68ba94c10525b6374d68bb8 100644 (file)
@@ -4,7 +4,6 @@
     #include <stdlib.h>
     #include <math.h>
 
-    #include "../signal/env.h"
     #include "../signal/freq.h"
     #include "../signal/pair.h"
     #include "../signal/track.h"
@@ -31,8 +30,6 @@
 
     void freq2freq_process_lowpass(freq2freq_obj * obj, const freqs_obj * freqsAllPass, freqs_obj * freqsLowPass);
 
-    void freq2freq_process_postfilter(freq2freq_obj * obj, const tracks_obj * tracks, const freqs_obj * freqsSeps, const envs_obj * envsSeps, const envs_obj * envsDiffuse, freqs_obj * freqsPosts);
-
     void freq2freq_process_interpolate(freq2freq_obj * obj, const freqs_obj * freqs, const freqs_obj * freqsInterp);
 
 #endif
\ No newline at end of file
diff --git a/src/system/steer2env.c b/src/system/steer2env.c
deleted file mode 100644 (file)
index 57de3e4..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-    
-    #include "steer2env.h"
-
-    steer2env_obj * steer2env_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize) {
-
-        steer2env_obj * obj;
-
-        obj = (steer2env_obj *) malloc(sizeof(steer2env_obj));
-
-        obj->nSeps = nSeps;
-        obj->nChannels = nChannels;
-        obj->halfFrameSize = halfFrameSize;
-
-        return obj;
-
-    }
-
-    void steer2env_destroy(steer2env_obj * obj) {
-
-        free((void *) obj);
-
-    }
-
-    void steer2env_process(steer2env_obj * obj, const tracks_obj * tracks, const steers_obj * demixing, const masks_obj * masks, const freqs_obj * freqs, envs_obj * envs) {
-
-        unsigned int iSep;
-        unsigned int iChannel;
-        unsigned int iBin;
-        
-        unsigned int iSampleSC;
-        unsigned int iSampleBC;
-        unsigned int iSampleB;
-
-        float Xreal;
-        float Ximag;
-        float Wreal;
-        float Wimag;
-        float Yreal;
-        float Yimag;
-
-        for (iSep = 0; iSep < obj->nSeps; iSep++) {
-
-            if (tracks->ids[iSep] != 0) {
-
-                memset(envs->array[iSep], 0x00, sizeof(float) * obj->halfFrameSize);
-
-                for (iChannel = 0; iChannel < obj->nChannels; iChannel++) {
-
-                    iSampleSC = iSep * obj->nChannels + iChannel;
-
-                    if (masks->array[iSampleSC] == 1) {
-
-                        for (iBin = 0; iBin < obj->halfFrameSize; iBin++)                 {
-
-                            iSampleBC = iBin * obj->nChannels + iChannel;
-                            iSampleB = iBin;
-
-                            Xreal = freqs->array[iChannel][iSampleB * 2 + 0];
-                            Ximag = freqs->array[iChannel][iSampleB * 2 + 1];
-
-                            Wreal = demixing->array[iSep][iSampleBC * 2 + 0];
-                            Wimag = demixing->array[iSep][iSampleBC * 2 + 1];
-
-                            Yreal = Wreal * Xreal - Wimag * Ximag;
-                            Yimag = Wreal * Ximag + Wimag * Xreal;
-
-                            envs->array[iSep][iSampleB] += sqrtf(Yreal*Yreal + Yimag*Yimag);
-
-                        }
-
-                    }
-
-                }
-
-            }
-            else {
-
-                memset(envs->array[iSep], 0x00, sizeof(float) * obj->halfFrameSize);
-
-            }
-
-        }        
-
-    }
diff --git a/src/system/steer2env.h b/src/system/steer2env.h
deleted file mode 100644 (file)
index 61e1f2d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __ODAS_SYSTEM_STEER2ENV
-#define __ODAS_SYSTEM_STEER2ENV
-
-    #include <stdlib.h>
-    #include <string.h>
-    #include <stdio.h>
-    #include <math.h>
-
-    #include "../signal/env.h"
-    #include "../signal/freq.h"
-    #include "../signal/mask.h"
-    #include "../signal/steer.h"
-    #include "../signal/track.h"
-
-    typedef struct steer2env_obj {
-
-        unsigned int nSeps;
-        unsigned int nChannels;
-        unsigned int halfFrameSize;
-
-    } steer2env_obj;    
-
-    steer2env_obj * steer2env_construct_zero(const unsigned int nSeps, const unsigned int nChannels, const unsigned int halfFrameSize);
-
-    void steer2env_destroy(steer2env_obj * obj);
-
-    void steer2env_process(steer2env_obj * obj, const tracks_obj * tracks, const steers_obj * demixing, const masks_obj * masks, const freqs_obj * freqs, envs_obj * envs);
-
-#endif
\ No newline at end of file