From e178cb5f70f3fa62d61bff015df4894b10b337cc Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 10 Jun 2024 16:36:29 -0400 Subject: [PATCH] cwFlow.h/cpp : Added is_non_real_time(). --- cwFlow.cpp | 11 +++++++++-- cwFlow.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cwFlow.cpp b/cwFlow.cpp index fd51fb2..cdc00da 100644 --- a/cwFlow.cpp +++ b/cwFlow.cpp @@ -654,10 +654,10 @@ void cw::flow::print_abuf( const abuf_t* abuf ) void cw::flow::print_external_device( const external_device_t* dev ) { - printf("Dev: %10s type:%3i fl:0x%x : ", cwStringNullGuard(dev->devLabel),dev->typeId,dev->flags); + cwLogPrint("Dev: %10s type:%3i fl:0x%x : ", cwStringNullGuard(dev->devLabel),dev->typeId,dev->flags); if( dev->typeId == kAudioDevTypeId ) print_abuf(dev->u.a.abuf); - printf("\n"); + cwLogPrint("\n"); } @@ -709,6 +709,7 @@ cw::rc_t cw::flow::create( handle_t& hRef, // parse the optional args if((rc = flowCfg->readv("network", 0, networkCfg, + "non_real_time_fl", kOptFl, p->non_real_time_fl, "framesPerCycle", kOptFl, p->framesPerCycle, "sample_rate", kOptFl, p->sample_rate, "maxCycleCount", kOptFl, maxCycleCount, @@ -796,6 +797,12 @@ cw::rc_t cw::flow::destroy( handle_t& hRef ) return rc; } +bool cw::flow::is_non_real_time( handle_t h ) +{ + flow_t* p = _handleToPtr(h); + return p->non_real_time_fl; +} + unsigned cw::flow::preset_cfg_flags( handle_t h ) { flow_t* p = _handleToPtr(h); diff --git a/cwFlow.h b/cwFlow.h index 1105163..33b2673 100644 --- a/cwFlow.h +++ b/cwFlow.h @@ -24,6 +24,8 @@ namespace cw rc_t destroy( handle_t& hRef ); + bool is_non_real_time( handle_t h ); + unsigned preset_cfg_flags( handle_t h ); // Run one cycle of the network.