From 94884d9aafc706ab93f248d27a07bbf6ff2f0954 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 20 Mar 2023 19:45:28 -0400 Subject: [PATCH] main.cpp,main.cfg : Updates to support flow_test(). --- src/cwtest/cfg/main.cfg | 19 ++++++++++++++++--- src/cwtest/main.cpp | 12 +----------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/cwtest/cfg/main.cfg b/src/cwtest/cfg/main.cfg index c57da5d..54614f0 100644 --- a/src/cwtest/cfg/main.cfg +++ b/src/cwtest/cfg/main.cfg @@ -55,7 +55,8 @@ xmtBufByteN: 2048, fmtBufByteN: 4096, websockTimeOutMs: 50, // max time out while blocking for a websock event - uiCfgFn: "ui.cfg" // default UI resource description + uiCfgFn: "ui.cfg", // default UI resource description + idleMsgPeriodMs: 50 }, listEle: { @@ -1330,10 +1331,22 @@ flow_test: { framesPerCycle:64, maxCycleCount:15000, + flow_proc_fname: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg", network: { - srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fname:"/home/kevin/temp/audio.wav", eofFl:true } } }, - dstFn: { class: audioFileOut, in:{ in:srcFn.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } }, + srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fname:"/home/kevin/temp/audio.wav", eofFl:false, on_off:true } } }, + + wet_in_gain: { class: audio_gain, in:{ in:srcFn.out }, args:{}}, + + pva: { class: pv_analysis, in:{ in:wet_in_gain.out }, args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } }, + sd: { class: spec_dist, in:{ in:pva.out }, preset:kc }, + pvs: { class: pv_synthesis, in:{ in:sd.out }, }, + cmp: { class: compressor, in:{ in:pvs.out }, preset:kc }, + + wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}}, + + + dstFn: { class: audioFileOut, in:{ in:wet_out_gain.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } }, } } diff --git a/src/cwtest/main.cpp b/src/cwtest/main.cpp index 6a5b0bf..216dc1a 100644 --- a/src/cwtest/main.cpp +++ b/src/cwtest/main.cpp @@ -396,17 +396,7 @@ cw::rc_t pvocFileProc( const cw::object_t* cfg, const cw::object_t* args cw::rc_t socketMdnsTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::net::mdns::test(); } cw::rc_t dnsSdTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::net::dnssd::test(); } cw::rc_t euConTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::eucon::test(); } - -cw::rc_t flowTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) -{ - cw::rc_t rc; - const cw::object_t* flow_proc_dict = nullptr; - - if((rc = cfg->getv("flow_proc_dict",flow_proc_dict)) != cw::kOkRC ) - return cwLogError(rc,"The 'flow_proc_dict' specification object was not found."); - - return cw::flow::test(flow_proc_dict,args); -} +cw::rc_t flowTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::flow::test(args); } cw::rc_t scoreFollowTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::score_follower::test(args); }