main.cpp,cfg/main.cfg : Pass arguments from main.cfg to ui::test() and io::test().

This commit is contained in:
kevin 2021-01-22 09:22:41 -05:00
parent 804c015b25
commit 44df01eb92
2 changed files with 126 additions and 55 deletions

View File

@ -42,12 +42,83 @@
socketSrvUdp: {},
socketSrvTcp: {},
sockMgrTest: {},
uiTest: {},
uiTest: {
ui: {
physRootDir: "/home/kevin/src/cwtest/src/libcw/html/uiTest",
dfltPageFn: "index.html",
port: 5687,
rcvBufByteN: 2048,
xmtBufByteN: 2048,
fmtBufByteN: 4096,
websockTimeOutMs: 50, // max time out while blocking for a websock event
uiCfgFn: "ui.cfg" // default UI resource description
}
},
socketMdns: {},
dnssd: {},
eucon: {},
dirEntry: {},
io: {},
io: {
ui: {
physRootDir: "/home/kevin/src/cwtest/src/libcw/html/ioTest",
dfltPageFn: "index.html",
port: 5687,
rcvBufByteN: 2048,
xmtBufByteN: 2048,
fmtBufByteN: 4096,
websockTimeOutMs: 50, // max time out while blocking for a websock event
uiCfgFn: "ui.cfg" // default UI resource description
},
serial: [
{
name: "port1",
device: "/dev/ttyACM0",
baud: 38400,
bits: 8,
stop: 1,
parity: no,
pollPeriodMs: 50
}
],
midi: {
parserBufByteN: 1024,
},
audio: {
meterMs: 50, // audio meter filter length and meter callback period
threadTimeOutMs: 50, // audio thread cond var time out
groupL: [
{
enableFl: true,
label: "main", // user label
id: 0,
srate: 48000,
dspFrameCnt: 64
}
],
deviceL: [
{
enableFl: true,
label: "main", // User label
device: "Scarlett 18i20 USB USB Audio",
//device: "USB Audio CODEC USB Audio",
// device: "HDA Intel PCH CS4208 Analog",
framesPerCycle: 512, // Samples per audio device cycle
cycleCnt: 3, //
inGroupId: 0, // All devices in a group must be ready to source
outGroupId: 0 // or sink data before an audio callback is made for that group
}
]
}
},
audioDevRpt: {},

View File

@ -361,9 +361,9 @@ cw::rc_t euConTest( const cw::object_t* cfg, const cw::object_t* args
#if defined(cwWEBSOCK)
cw::rc_t websockSrvTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::websockSrvTest(cfg); }
cw::rc_t uiTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::ui::test(); }
cw::rc_t uiTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::ui::test(args); }
#if defined(cwALSA)
cw::rc_t ioTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::io::test(); }
cw::rc_t ioTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::io::test(args); }
#else
cw::rc_t _no_alsa_websock() { return cwLogError(cw::kResourceNotAvailableRC,"Websock or ALSA functionality not included in this build."); }
cw::rc_t ioTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa_websock(); }