--- /dev/null
+
+ #include "amod_istft.h"
+
+ amod_istft_obj * amod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config) {
+
+ amod_istft_obj * obj;
+
+ obj = (amod_istft_obj *) malloc(sizeof(amod_istft_obj));
+
+ obj->mod_istft = mod_istft_construct(mod_istft_config, msg_spectra_config, msg_hops_config);
+ obj->in = (amsg_spectra_obj *) NULL;
+ obj->out = (amsg_hops_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_istft_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_istft_destroy(amod_istft_obj * obj) {
+
+ mod_istft_destroy(obj->mod_istft);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_istft_connect(amod_istft_obj * obj, amsg_spectra_obj * in, amsg_hops_obj * out) {
+
+ obj->in = in;
+ obj->out = out;
+
+ }
+
+ void amod_istft_disconnect(amod_istft_obj * obj) {
+
+ obj->in = (amsg_spectra_obj *) NULL;
+ obj->out = (amsg_hops_obj *) NULL;
+
+ }
+
+ void * amod_istft_thread(void * ptr) {
+
+ amod_istft_obj * obj;
+ msg_spectra_obj * msg_spectra_in;
+ msg_hops_obj * msg_hops_out;
+ int rtnValue;
+
+ obj = (amod_istft_obj *) ptr;
+
+ while(1) {
+
+ // Pop a message, process, and push back
+ msg_spectra_in = amsg_spectra_filled_pop(obj->in);
+ msg_hops_out = amsg_hops_empty_pop(obj->out);
+ mod_istft_connect(obj->mod_istft, msg_spectra_in, msg_hops_out);
+ rtnValue = mod_istft_process(obj->mod_istft);
+ mod_istft_disconnect(obj->mod_istft);
+ amsg_spectra_empty_push(obj->in, msg_spectra_in);
+ amsg_hops_filled_push(obj->out, msg_hops_out);
+
+ // If this is the last frame, rtnValue = -1
+ if (rtnValue == -1) {
+ break;
+ }
+
+ }
+
+ }
\ No newline at end of file
--- /dev/null
+#ifndef __ODAS_AMODULE_ISTFT
+#define __ODAS_AMODULE_ISTFT
+
+ #include "../module/mod_istft.h"
+ #include "../amessage/amsg_spectra.h"
+ #include "../amessage/amsg_hops.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_istft_obj {
+
+ mod_istft_obj * mod_istft;
+ amsg_spectra_obj * in;
+ amsg_hops_obj * out;
+ thread_obj * thread;
+
+ } amod_istft_obj;
+
+ amod_istft_obj * amod_istft_construct(const mod_istft_cfg * mod_istft_config, const msg_spectra_cfg * msg_spectra_config, const msg_hops_cfg * msg_hops_config);
+
+ void amod_istft_destroy(amod_istft_obj * obj);
+
+ void amod_istft_connect(amod_istft_obj * obj, amsg_spectra_obj * in, amsg_hops_obj * out);
+
+ void amod_istft_disconnect(amod_istft_obj * obj);
+
+ void * amod_istft_thread(void * ptr);
+
+#endif
\ No newline at end of file
--- /dev/null
+
+ #include "amod_mapping.h"
+
+ amod_mapping_obj * amod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config) {
+
+ amod_mapping_obj * obj;
+
+ obj = (amod_mapping_obj *) malloc(sizeof(amod_mapping_obj));
+
+ obj->mod_mapping = mod_mapping_construct(mod_mapping_config, msg_hops_config);
+ obj->in = (amsg_hops_obj *) NULL;
+ obj->out = (amsg_hops_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_mapping_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_mapping_destroy(amod_mapping_obj * obj) {
+
+ mod_mapping_destroy(obj->mod_mapping);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_mapping_connect(amod_mapping_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out) {
+
+ obj->in = in;
+ obj->out = out;
+
+ }
+
+ void amod_mapping_disconnect(amod_mapping_obj * obj) {
+
+ obj->in = (amsg_hops_obj *) NULL;
+ obj->out = (amsg_hops_obj *) NULL;
+
+ }
+
+ void * amod_mapping_thread(void * ptr) {
+
+ amod_mapping_obj * obj;
+ msg_hops_obj * msg_hops_in;
+ msg_hops_obj * msg_hops_out;
+ int rtnValue;
+
+ obj = (amod_mapping_obj *) ptr;
+
+ while(1) {
+
+ // Pop a message, process, and push back
+ msg_hops_in = amsg_hops_filled_pop(obj->in);
+ msg_hops_out = amsg_hops_empty_pop(obj->out);
+ mod_mapping_connect(obj->mod_mapping, msg_hops_in, msg_hops_out);
+ rtnValue = mod_mapping_process(obj->mod_mapping);
+ mod_mapping_disconnect(obj->mod_mapping);
+ amsg_hops_empty_push(obj->in, msg_hops_in);
+ amsg_hops_filled_push(obj->out, msg_hops_out);
+
+ // If this is the last frame, rtnValue = -1
+ if (rtnValue == -1) {
+ break;
+ }
+
+ }
+
+ }
\ No newline at end of file
--- /dev/null
+#ifndef __ODAS_AMODULE_MAPPING
+#define __ODAS_AMODULE_MAPPING
+
+ #include "../module/mod_mapping.h"
+ #include "../amessage/amsg_hops.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_mapping_obj {
+
+ mod_mapping_obj * mod_mapping;
+ amsg_hops_obj * in;
+ amsg_hops_obj * out;
+ thread_obj * thread;
+
+ } amod_mapping_obj;
+
+ amod_mapping_obj * amod_mapping_construct(const mod_mapping_cfg * mod_mapping_config, const msg_hops_cfg * msg_hops_config);
+
+ void amod_mapping_destroy(amod_mapping_obj * obj);
+
+ void amod_mapping_connect(amod_mapping_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out);
+
+ void amod_mapping_disconnect(amod_mapping_obj * obj);
+
+ void * amod_mapping_thread(void * ptr);
+
+#endif
\ No newline at end of file
--- /dev/null
+
+ #include "amod_resample.h"
+
+ amod_resample_obj * amod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config) {
+
+ amod_resample_obj * obj;
+
+ obj = (amod_resample_obj *) malloc(sizeof(amod_resample_obj));
+
+ obj->mod_resample = mod_resample_construct(mod_resample_config, msg_hops_in_config, msg_hops_out_config);
+ obj->in = (amsg_hops_obj *) NULL;
+ obj->out = (amsg_hops_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_resample_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_resample_destroy(amod_resample_obj * obj) {
+
+ mod_resample_destroy(obj->mod_resample);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_resample_connect(amod_resample_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out) {
+
+ obj->in = in;
+ obj->out = out;
+
+ }
+
+ void amod_resample_disconnect(amod_resample_obj * obj) {
+
+ obj->in = (amsg_hops_obj *) NULL;
+ obj->out = (amsg_hops_obj *) NULL;
+
+ }
+
+ void * amod_resample_thread(void * ptr) {
+
+ amod_resample_obj * obj;
+ msg_hops_obj * msg_hops_in;
+ msg_hops_obj * msg_hops_out;
+ int rtnValue;
+
+ obj = (amod_resample_obj *) ptr;
+
+ rtnValue = 4;
+
+ while(1) {
+
+ if ((rtnValue == 3) || (rtnValue == 4)) {
+ msg_hops_in = amsg_hops_filled_pop(obj->in);
+ }
+ if ((rtnValue == 2) || (rtnValue == 4)) {
+ msg_hops_out = amsg_hops_empty_pop(obj->out);
+ }
+
+ mod_resample_connect(obj->mod_resample, msg_hops_in, msg_hops_out);
+ rtnValue = mod_resample_process(obj->mod_resample);
+ mod_resample_disconnect(obj->mod_resample);
+
+ if ((rtnValue == 3) || (rtnValue == 4) || (rtnValue == -1)) {
+ amsg_hops_empty_push(obj->in, msg_hops_in);
+ }
+ if ((rtnValue == 2) || (rtnValue == 4) || (rtnValue == -1)) {
+ amsg_hops_filled_push(obj->out, msg_hops_out);
+ }
+
+ // If this is the last frame, rtnValue = -1
+ if (rtnValue == -1) {
+ break;
+ }
+
+ }
+
+ }
\ No newline at end of file
--- /dev/null
+#ifndef __ODAS_AMODULE_RESAMPLE
+#define __ODAS_AMODULE_RESAMPLE
+
+ #include "../module/mod_resample.h"
+ #include "../amessage/amsg_hops.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_resample_obj {
+
+ mod_resample_obj * mod_resample;
+ amsg_hops_obj * in;
+ amsg_hops_obj * out;
+ thread_obj * thread;
+
+ } amod_resample_obj;
+
+ amod_resample_obj * amod_resample_construct(const mod_resample_cfg * mod_resample_config, const msg_hops_cfg * msg_hops_in_config, const msg_hops_cfg * msg_hops_out_config);
+
+ void amod_resample_destroy(amod_resample_obj * obj);
+
+ void amod_resample_connect(amod_resample_obj * obj, amsg_hops_obj * in, amsg_hops_obj * out);
+
+ void amod_resample_disconnect(amod_resample_obj * obj);
+
+ void * amod_resample_thread(void * ptr);
+
+#endif
\ No newline at end of file
--- /dev/null
+
+ #include "amod_ssl.h"
+
+ amod_ssl_obj * amod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config) {
+
+ amod_ssl_obj * obj;
+
+ obj = (amod_ssl_obj *) malloc(sizeof(amod_ssl_obj));
+
+ obj->mod_ssl = mod_ssl_construct(mod_ssl_config, msg_spectra_config, msg_pots_config);
+ obj->in = (amsg_spectra_obj *) NULL;
+ obj->out = (amsg_pots_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_ssl_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_ssl_destroy(amod_ssl_obj * obj) {
+
+ mod_ssl_destroy(obj->mod_ssl);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_ssl_connect(amod_ssl_obj * obj, amsg_spectra_obj * in, amsg_pots_obj * out) {
+
+ obj->in = in;
+ obj->out = out;
+
+ }
+
+ void amod_ssl_disconnect(amod_ssl_obj * obj) {
+
+ obj->in = (amsg_spectra_obj *) NULL;
+ obj->out = (amsg_pots_obj *) NULL;
+
+ }
+
+ void * amod_ssl_thread(void * ptr) {
+
+ amod_ssl_obj * obj;
+ msg_spectra_obj * msg_spectra_in;
+ msg_pots_obj * msg_pots_out;
+ int rtnValue;
+
+ obj = (amod_ssl_obj *) ptr;
+
+ while(1) {
+
+ // Pop a message, process, and push back
+ msg_spectra_in = amsg_spectra_filled_pop(obj->in);
+ msg_pots_out = amsg_pots_empty_pop(obj->out);
+ mod_ssl_connect(obj->mod_ssl, msg_spectra_in, msg_pots_out);
+ rtnValue = mod_ssl_process(obj->mod_ssl);
+ mod_ssl_disconnect(obj->mod_ssl);
+ amsg_spectra_empty_push(obj->in, msg_spectra_in);
+ amsg_pots_filled_push(obj->out, msg_pots_out);
+
+ // If this is the last frame, rtnValue = -1
+ if (rtnValue == -1) {
+ break;
+ }
+
+
+ }
+
+ }
--- /dev/null
+#ifndef __ODAS_AMODULE_SSL
+#define __ODAS_AMODULE_SSL
+
+ #include "../module/mod_ssl.h"
+ #include "../amessage/amsg_spectra.h"
+ #include "../amessage/amsg_pots.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_ssl_obj {
+
+ mod_ssl_obj * mod_ssl;
+ amsg_spectra_obj * in;
+ amsg_pots_obj * out;
+ thread_obj * thread;
+
+ } amod_ssl_obj;
+
+ amod_ssl_obj * amod_ssl_construct(const mod_ssl_cfg * mod_ssl_config, const msg_spectra_cfg * msg_spectra_config, const msg_pots_cfg * msg_pots_config);
+
+ void amod_ssl_destroy(amod_ssl_obj * obj);
+
+ void amod_ssl_connect(amod_ssl_obj * obj, amsg_spectra_obj * in, amsg_pots_obj * out);
+
+ void amod_ssl_disconnect(amod_ssl_obj * obj);
+
+ void * amod_ssl_thread(void * ptr);
+
+#endif
\ No newline at end of file
--- /dev/null
+
+ #include "amod_sspf.h"
+
+ amod_sspf_obj * amod_sspf_construct(const mod_sspf_cfg * mod_sspf_config, const msg_spectra_cfg * msg_spectra_config, const msg_tracks_cfg * msg_tracks_config) {
+
+ amod_sspf_obj * obj;
+
+ obj = (amod_sspf_obj *) malloc(sizeof(amod_sspf_obj));
+
+ obj->mod_sspf = mod_sspf_construct(mod_sspf_config, msg_spectra_config, msg_tracks_config);
+
+ obj->in1 = (amsg_spectra_obj *) NULL;
+ obj->in2 = (amsg_spectra_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_spectra_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_spectra_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_in1;
+ msg_spectra_obj * msg_spectra_in2;
+ 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_in1 = amsg_spectra_filled_pop(obj->in1);
+ msg_spectra_in2 = amsg_spectra_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_in1, msg_spectra_in2, 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_in1);
+ amsg_spectra_empty_push(obj->in2, msg_spectra_in2);
+ 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
--- /dev/null
+#ifndef __ODAS_AMODULE_SSPF
+#define __ODAS_AMODULE_SSPF
+
+ #include "../module/mod_sspf.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_spectra_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_spectra_cfg * msg_spectra_config, const msg_tracks_cfg * msg_tracks_config);
+
+ void amod_sspf_destroy(amod_sspf_obj * obj);
+
+ void amod_sspf_connect(amod_sspf_obj * obj, amsg_spectra_obj * in1, amsg_spectra_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
--- /dev/null
+
+ #include "amod_sss.h"
+
+ amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_spectra_cfg * msg_spectra_config, const msg_tracks_cfg * msg_tracks_config) {
+
+ amod_sss_obj * obj;
+
+ obj = (amod_sss_obj *) malloc(sizeof(amod_sss_obj));
+
+ obj->mod_sss = mod_sss_construct(mod_sss_config, msg_spectra_config, msg_tracks_config);
+
+ obj->in1 = (amsg_spectra_obj *) NULL;
+ obj->in2 = (amsg_tracks_obj *) NULL;
+ obj->out = (amsg_spectra_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_sss_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_sss_destroy(amod_sss_obj * obj) {
+
+ mod_sss_destroy(obj->mod_sss);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_sss_connect(amod_sss_obj * obj, amsg_spectra_obj * in1, amsg_tracks_obj * in2, amsg_spectra_obj * out) {
+
+ obj->in1 = in1;
+ obj->in2 = in2;
+ obj->out = out;
+
+ }
+
+ void amod_sss_disconnect(amod_sss_obj * obj) {
+
+ obj->in1 = (amsg_spectra_obj *) NULL;
+ obj->in2 = (amsg_tracks_obj *) NULL;
+ obj->out = (amsg_spectra_obj *) NULL;
+
+ }
+
+ void * amod_sss_thread(void * ptr) {
+
+ amod_sss_obj * obj;
+ msg_spectra_obj * msg_spectra_in;
+ msg_tracks_obj * msg_tracks_in;
+ msg_spectra_obj * msg_spectra_out;
+ int rtnValue;
+
+ obj = (amod_sss_obj *) ptr;
+
+ while(1) {
+
+ // 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->out);
+ mod_sss_connect(obj->mod_sss, msg_spectra_in, msg_tracks_in, msg_spectra_out);
+ 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->out, msg_spectra_out);
+
+ // If this is the last frame, rtnValue = -1
+ if (rtnValue == -1) {
+ break;
+ }
+
+ }
+
+ }
--- /dev/null
+#ifndef __ODAS_AMODULE_SSS
+#define __ODAS_AMODULE_SSS
+
+ #include "../module/mod_sss.h"
+ #include "../amessage/amsg_tracks.h"
+ #include "../amessage/amsg_spectra.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_sss_obj {
+
+ mod_sss_obj * mod_sss;
+ amsg_spectra_obj * in1;
+ amsg_tracks_obj * in2;
+ amsg_spectra_obj * out;
+ thread_obj * thread;
+
+ } amod_sss_obj;
+
+ amod_sss_obj * amod_sss_construct(const mod_sss_cfg * mod_sss_config, const msg_spectra_cfg * msg_spectra_config, const msg_tracks_cfg * msg_tracks_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 * out);
+
+ void amod_sss_disconnect(amod_sss_obj * obj);
+
+ void * amod_sss_thread(void * ptr);
+
+#endif
\ No newline at end of file
--- /dev/null
+
+ #include "amod_sst.h"
+
+ amod_sst_obj * amod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_tracks_cfg * msg_tracks_config) {
+
+ amod_sst_obj * obj;
+
+ obj = (amod_sst_obj *) malloc(sizeof(amod_sst_obj));
+
+ obj->mod_sst = mod_sst_construct(mod_sst_config, mod_ssl_config, msg_pots_config, msg_tracks_config);
+ obj->in = (amsg_pots_obj *) NULL;
+ obj->out = (amsg_tracks_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_sst_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_sst_destroy(amod_sst_obj * obj) {
+
+ mod_sst_destroy(obj->mod_sst);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_sst_connect(amod_sst_obj * obj, amsg_pots_obj * in, amsg_tracks_obj * out) {
+
+ obj->in = in;
+ obj->out = out;
+
+ }
+
+ void amod_sst_disconnect(amod_sst_obj * obj) {
+
+ obj->in = (amsg_pots_obj *) NULL;
+ obj->out = (amsg_tracks_obj *) NULL;
+
+ }
+
+ void * amod_sst_thread(void * ptr) {
+
+ amod_sst_obj * obj;
+ msg_pots_obj * msg_pots_in;
+ msg_tracks_obj * msg_tracks_out;
+ int rtnValue;
+
+ obj = (amod_sst_obj *) ptr;
+
+ while(1) {
+
+ // Pop a message, process, and push back
+ msg_pots_in = amsg_pots_filled_pop(obj->in);
+ msg_tracks_out = amsg_tracks_empty_pop(obj->out);
+ mod_sst_connect(obj->mod_sst, msg_pots_in, msg_tracks_out);
+ rtnValue = mod_sst_process(obj->mod_sst);
+ mod_sst_disconnect(obj->mod_sst);
+ amsg_pots_empty_push(obj->in, msg_pots_in);
+ amsg_tracks_filled_push(obj->out, msg_tracks_out);
+
+ // If this is the last frame, rtnValue = -1
+ if (rtnValue == -1) {
+ break;
+ }
+
+ }
+
+ }
\ No newline at end of file
--- /dev/null
+#ifndef __ODAS_AMODULE_SST
+#define __ODAS_AMODULE_SST
+
+ #include "../module/mod_ssl.h"
+ #include "../module/mod_sst.h"
+ #include "../amessage/amsg_pots.h"
+ #include "../amessage/amsg_tracks.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_sst_obj {
+
+ mod_sst_obj * mod_sst;
+ amsg_pots_obj * in;
+ amsg_tracks_obj * out;
+ thread_obj * thread;
+
+ } amod_sst_obj;
+
+ amod_sst_obj * amod_sst_construct(const mod_sst_cfg * mod_sst_config, const mod_ssl_cfg * mod_ssl_config, const msg_pots_cfg * msg_pots_config, const msg_tracks_cfg * msg_tracks_config);
+
+ void amod_sst_destroy(amod_sst_obj * obj);
+
+ void amod_sst_connect(amod_sst_obj * obj, amsg_pots_obj * in, amsg_tracks_obj * out);
+
+ void amod_sst_disconnect(amod_sst_obj * obj);
+
+ void * amod_sst_thread(void * ptr);
+
+#endif
\ No newline at end of file
--- /dev/null
+
+ #include "amod_stft.h"
+
+ amod_stft_obj * amod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config) {
+
+ amod_stft_obj * obj;
+
+ obj = (amod_stft_obj *) malloc(sizeof(amod_stft_obj));
+
+ obj->mod_stft = mod_stft_construct(mod_stft_config, msg_hops_config, msg_spectra_config);
+ obj->in = (amsg_hops_obj *) NULL;
+ obj->out = (amsg_spectra_obj *) NULL;
+
+ obj->thread = thread_construct(&amod_stft_thread, (void *) obj);
+
+ return obj;
+
+ }
+
+ void amod_stft_destroy(amod_stft_obj * obj) {
+
+ mod_stft_destroy(obj->mod_stft);
+ thread_destroy(obj->thread);
+
+ free((void *) obj);
+
+ }
+
+ void amod_stft_connect(amod_stft_obj * obj, amsg_hops_obj * in, amsg_spectra_obj * out) {
+
+ obj->in = in;
+ obj->out = out;
+
+ }
+
+ void amod_stft_disconnect(amod_stft_obj * obj) {
+
+ obj->in = (amsg_hops_obj *) NULL;
+ obj->out = (amsg_spectra_obj *) NULL;
+
+ }
+
+ void * amod_stft_thread(void * ptr) {
+
+ amod_stft_obj * obj;
+ msg_hops_obj * msg_hops_in;
+ msg_spectra_obj * msg_spectra_out;
+ int rtnValue;
+
+ obj = (amod_stft_obj *) ptr;
+
+ while(1) {
+
+ // Pop a message, process, and push back
+ msg_hops_in = amsg_hops_filled_pop(obj->in);
+ msg_spectra_out = amsg_spectra_empty_pop(obj->out);
+ mod_stft_connect(obj->mod_stft, msg_hops_in, msg_spectra_out);
+ rtnValue = mod_stft_process(obj->mod_stft);
+ mod_stft_disconnect(obj->mod_stft);
+ amsg_hops_empty_push(obj->in, msg_hops_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
--- /dev/null
+#ifndef __ODAS_AMODULE_STFT
+#define __ODAS_AMODULE_STFT
+
+ #include "../module/mod_stft.h"
+ #include "../amessage/amsg_hops.h"
+ #include "../amessage/amsg_spectra.h"
+ #include "../general/thread.h"
+
+ typedef struct amod_stft_obj {
+
+ mod_stft_obj * mod_stft;
+ amsg_hops_obj * in;
+ amsg_spectra_obj * out;
+ thread_obj * thread;
+
+ } amod_stft_obj;
+
+ amod_stft_obj * amod_stft_construct(const mod_stft_cfg * mod_stft_config, const msg_hops_cfg * msg_hops_config, const msg_spectra_cfg * msg_spectra_config);
+
+ void amod_stft_destroy(amod_stft_obj * obj);
+
+ void amod_stft_connect(amod_stft_obj * obj, amsg_hops_obj * in, amsg_spectra_obj * out);
+
+ void amod_stft_disconnect(amod_stft_obj * obj);
+
+ void * amod_stft_thread(void * ptr);
+
+#endif
\ No newline at end of file