cwFlow.h/cpp : Added is_non_real_time().

This commit is contained in:
kevin 2024-06-10 16:36:29 -04:00
parent e0f92677c8
commit e178cb5f70
2 changed files with 11 additions and 2 deletions

View File

@ -654,10 +654,10 @@ void cw::flow::print_abuf( const abuf_t* abuf )
void cw::flow::print_external_device( const external_device_t* dev ) 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 ) if( dev->typeId == kAudioDevTypeId )
print_abuf(dev->u.a.abuf); 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 // parse the optional args
if((rc = flowCfg->readv("network", 0, networkCfg, if((rc = flowCfg->readv("network", 0, networkCfg,
"non_real_time_fl", kOptFl, p->non_real_time_fl,
"framesPerCycle", kOptFl, p->framesPerCycle, "framesPerCycle", kOptFl, p->framesPerCycle,
"sample_rate", kOptFl, p->sample_rate, "sample_rate", kOptFl, p->sample_rate,
"maxCycleCount", kOptFl, maxCycleCount, "maxCycleCount", kOptFl, maxCycleCount,
@ -796,6 +797,12 @@ cw::rc_t cw::flow::destroy( handle_t& hRef )
return rc; 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 ) unsigned cw::flow::preset_cfg_flags( handle_t h )
{ {
flow_t* p = _handleToPtr(h); flow_t* p = _handleToPtr(h);

View File

@ -24,6 +24,8 @@ namespace cw
rc_t destroy( handle_t& hRef ); rc_t destroy( handle_t& hRef );
bool is_non_real_time( handle_t h );
unsigned preset_cfg_flags( handle_t h ); unsigned preset_cfg_flags( handle_t h );
// Run one cycle of the network. // Run one cycle of the network.