Selaa lähdekoodia

cmDevCfg.h/c:Added label to domain specific cfg records.

master
kevin 11 vuotta sitten
vanhempi
commit
1be236f8d2
2 muutettua tiedostoa jossa 125 lisäystä ja 119 poistoa
  1. 117
    114
      cmDevCfg.c
  2. 8
    5
      cmDevCfg.h

+ 117
- 114
cmDevCfg.c Näytä tiedosto

25
 
25
 
26
 typedef struct cmDcmCfg_str
26
 typedef struct cmDcmCfg_str
27
 {
27
 {
28
-  cmChar_t*     dcLabelStr;   // the cfg label 
29
-  unsigned      cfgId;        // unique among all cfg's assigned to a loc
30
-  cmTypeDcmId_t typeId;       // the cfg type id (e.g. midi, audio, net, ...)
31
-  cmChar_t*     descStr;      // summary description string 
28
+  cmChar_t*     dcLabelStr;     // the cfg label 
29
+  unsigned      cfgId;          // unique among all cfg's assigned to a loc
30
+  cmTypeDcmId_t typeId;         // the cfg type id (e.g. midi, audio, net, ...)
31
+  cmChar_t*     descStr;        // summary description string 
32
 
32
 
33
   // NOTE: any fields added to this structure, type generic (above) 
33
   // NOTE: any fields added to this structure, type generic (above) 
34
   // or type specific (below), must be explicitely duplicated in cmDevCfgLocStore().
34
   // or type specific (below), must be explicitely duplicated in cmDevCfgLocStore().
46
 
46
 
47
 typedef struct
47
 typedef struct
48
 {
48
 {
49
-  cmTypeDcmId_t tid;      // Type Id for this map or tInvalidDcmTId if the record is not active.
50
-  unsigned      cfgId;    // cfgId of the cfg recd assoc'd with this map
51
-  cmDcmCfg_t*   cfg;      // pointer to the cfg recd assoc'd with this map (cfg->cfgId == cmDcmMap_t.cfgId)
49
+  cmTypeDcmId_t tid;            // Type Id for this map or tInvalidDcmTId if the record is not active.
50
+  unsigned      cfgId;          // cfgId of the cfg recd assoc'd with this map
51
+  cmDcmCfg_t*   cfg;            // pointer to the cfg recd assoc'd with this map (cfg->cfgId == cmDcmMap_t.cfgId)
52
 } cmDcmMap_t;
52
 } cmDcmMap_t;
53
 
53
 
54
 typedef struct
54
 typedef struct
60
 
60
 
61
 typedef struct cmDcmLoc_str
61
 typedef struct cmDcmLoc_str
62
 {
62
 {
63
-  cmChar_t*            labelStr;
63
+  cmChar_t* labelStr;
64
 
64
 
65
-  cmDcmApp_t*          app;
66
-  unsigned             appCnt;
65
+  cmDcmApp_t* app;
66
+  unsigned    appCnt;
67
 
67
 
68
   cmDcmCfg_t*          cfg;
68
   cmDcmCfg_t*          cfg;
69
 
69
 
134
 {
134
 {
135
   d->inDevLabelStr  = cmMemAllocStr(s->inDevLabelStr);
135
   d->inDevLabelStr  = cmMemAllocStr(s->inDevLabelStr);
136
   d->outDevLabelStr = cmMemAllocStr(s->outDevLabelStr);
136
   d->outDevLabelStr = cmMemAllocStr(s->outDevLabelStr);
137
-  d->audioSysArgs   = s->audioSysArgs;
137
+  d->rtSysArgs      = s->rtSysArgs;
138
 }
138
 }
139
 
139
 
140
 void _cmDcmFreeNet( cmDcmNet_t* r )
140
 void _cmDcmFreeNet( cmDcmNet_t* r )
155
 {
155
 {
156
   // unlink the cfg recd
156
   // unlink the cfg recd
157
   if( cp->prev == NULL )
157
   if( cp->prev == NULL )
158
-    lp->cfg = cp->next;
158
+    lp->cfg        = cp->next;
159
   else
159
   else
160
     cp->prev->next = cp->next;
160
     cp->prev->next = cp->next;
161
   
161
   
184
 
184
 
185
   // unlink the loc recd
185
   // unlink the loc recd
186
   if( lp->prev == NULL )
186
   if( lp->prev == NULL )
187
-    p->loc = lp->next;
187
+    p->loc         = lp->next;
188
   else
188
   else
189
     lp->prev->next = lp->next;
189
     lp->prev->next = lp->next;
190
 
190
 
210
   while( p->loc != NULL )
210
   while( p->loc != NULL )
211
     _cmDcmFreeLoc(p,p->loc);
211
     _cmDcmFreeLoc(p,p->loc);
212
   
212
   
213
-  p->clp    = NULL;
213
+  p->clp = NULL;
214
 }
214
 }
215
 
215
 
216
 cmDcRC_t _cmDcmFree( cmDcm_t* p )
216
 cmDcRC_t _cmDcmFree( cmDcm_t* p )
226
 
226
 
227
 cmDcmLoc_t* _cmDcmFindLoc( cmDcm_t* p, const cmChar_t* labelStr )
227
 cmDcmLoc_t* _cmDcmFindLoc( cmDcm_t* p, const cmChar_t* labelStr )
228
 {
228
 {
229
-  cmDcmLoc_t* lp = p->loc;
229
+  cmDcmLoc_t* lp                      = p->loc;
230
   for(; lp!=NULL; lp=lp->next)
230
   for(; lp!=NULL; lp=lp->next)
231
-    if(strcmp(lp->labelStr,labelStr)==0)
231
+    if(strcmp(lp->labelStr,labelStr) == 0)
232
       return lp;
232
       return lp;
233
   return NULL;
233
   return NULL;
234
 }
234
 }
250
     return cmErrMsg(&p->err,kDuplLabelDcRC,"The location label '%s' is already in use.",labelStr);
250
     return cmErrMsg(&p->err,kDuplLabelDcRC,"The location label '%s' is already in use.",labelStr);
251
 
251
 
252
   // create a new loc recd
252
   // create a new loc recd
253
-  lp  = cmMemAllocZ(cmDcmLoc_t,1);
253
+  lp           = cmMemAllocZ(cmDcmLoc_t,1);
254
   lp->labelStr = cmMemAllocStr(labelStr);
254
   lp->labelStr = cmMemAllocStr(labelStr);
255
 
255
 
256
   // if the cur loc is not current set - then prepend loc
256
   // if the cur loc is not current set - then prepend loc
257
   if( p->clp == NULL )
257
   if( p->clp == NULL )
258
   {
258
   {
259
-    lp->prev = NULL;
260
-    lp->next = p->loc;
259
+    lp->prev       = NULL;
260
+    lp->next       = p->loc;
261
     if( p->loc == NULL )
261
     if( p->loc == NULL )
262
-      p->loc = lp;
262
+      p->loc       = lp;
263
     else
263
     else
264
       p->loc->prev = lp;    
264
       p->loc->prev = lp;    
265
   }
265
   }
266
-  else // otherwise insert loc after the cur loc
266
+  else                          // otherwise insert loc after the cur loc
267
   {
267
   {
268
     lp->prev = p->clp;
268
     lp->prev = p->clp;
269
-    lp->next = p->clp->next;
269
+    lp->next             = p->clp->next;
270
     if( p->clp->next != NULL )
270
     if( p->clp->next != NULL )
271
       p->clp->next->prev = lp;
271
       p->clp->next->prev = lp;
272
-    p->clp->next = lp;
272
+    p->clp->next         = lp;
273
   }
273
   }
274
 
274
 
275
   // make the new loc the current loc
275
   // make the new loc the current loc
309
 
309
 
310
 cmDcRC_t cmDevCfgAlloc( cmCtx_t* c, cmDevCfgH_t* hp, const cmChar_t* fn )
310
 cmDcRC_t cmDevCfgAlloc( cmCtx_t* c, cmDevCfgH_t* hp, const cmChar_t* fn )
311
 {
311
 {
312
-  cmDcRC_t rc;
312
+  cmDcRC_t    rc;
313
   cmDcmLoc_t* lp;
313
   cmDcmLoc_t* lp;
314
 
314
 
315
   if((rc = cmDevCfgFree(hp)) != kOkDcRC )
315
   if((rc = cmDevCfgFree(hp)) != kOkDcRC )
351
 
351
 
352
 cmDcRC_t cmDevCfgFree( cmDevCfgH_t* hp )
352
 cmDcRC_t cmDevCfgFree( cmDevCfgH_t* hp )
353
 {
353
 {
354
-  cmDcRC_t rc = kOkDcRC;
355
-  if( hp == NULL || cmDevCfgIsValid(*hp)==false )
354
+  cmDcRC_t rc                             = kOkDcRC;
355
+  if( hp == NULL || cmDevCfgIsValid(*hp) == false )
356
     return rc;
356
     return rc;
357
 
357
 
358
   cmDcm_t* p = _cmDcmHandleToPtr(*hp);
358
   cmDcm_t* p = _cmDcmHandleToPtr(*hp);
370
 
370
 
371
 unsigned cmDevCfgCount( cmDevCfgH_t h, cmTypeDcmId_t typeId )
371
 unsigned cmDevCfgCount( cmDevCfgH_t h, cmTypeDcmId_t typeId )
372
 {
372
 {
373
-  unsigned n=0;
373
+  unsigned n = 0;
374
   cmDcm_t* p = _cmDcmHandleToPtr(h);
374
   cmDcm_t* p = _cmDcmHandleToPtr(h);
375
 
375
 
376
   assert( p->clp != NULL);
376
   assert( p->clp != NULL);
384
 
384
 
385
 cmDcmCfg_t* _cmDevCfgIndexToPtr( cmDcm_t* p, cmTypeDcmId_t typeId, unsigned index, bool errFl )
385
 cmDcmCfg_t* _cmDevCfgIndexToPtr( cmDcm_t* p, cmTypeDcmId_t typeId, unsigned index, bool errFl )
386
 {
386
 {
387
-  unsigned n=0;
387
+  unsigned    n  = 0;
388
   assert( p->clp != NULL);
388
   assert( p->clp != NULL);
389
   cmDcmCfg_t* cp = p->clp->cfg;
389
   cmDcmCfg_t* cp = p->clp->cfg;
390
   for(; cp!= NULL; cp=cp->next)
390
   for(; cp!= NULL; cp=cp->next)
403
 
403
 
404
 const cmChar_t* cmDevCfgLabel( cmDevCfgH_t h, cmTypeDcmId_t typeId, unsigned index )
404
 const cmChar_t* cmDevCfgLabel( cmDevCfgH_t h, cmTypeDcmId_t typeId, unsigned index )
405
 {
405
 {
406
-  cmDcm_t*    p = _cmDcmHandleToPtr(h);
406
+  cmDcm_t*    p                                        = _cmDcmHandleToPtr(h);
407
   cmDcmCfg_t* cp;
407
   cmDcmCfg_t* cp;
408
   if((cp = _cmDevCfgIndexToPtr(p,typeId,index,false)) == NULL )
408
   if((cp = _cmDevCfgIndexToPtr(p,typeId,index,false)) == NULL )
409
     return NULL;
409
     return NULL;
428
   for(; cp!= NULL; cp=cp->next)
428
   for(; cp!= NULL; cp=cp->next)
429
     if( cp->typeId == typeId )
429
     if( cp->typeId == typeId )
430
     {
430
     {
431
-      if( strcmp(cp->dcLabelStr,label)==0 )
431
+      if( strcmp(cp->dcLabelStr,label) == 0 )
432
         return cp;
432
         return cp;
433
     }
433
     }
434
 
434
 
440
 
440
 
441
 unsigned cmDevCfgLabelToIndex( cmDevCfgH_t h, cmTypeDcmId_t typeId, const cmChar_t* label )
441
 unsigned cmDevCfgLabelToIndex( cmDevCfgH_t h, cmTypeDcmId_t typeId, const cmChar_t* label )
442
 {
442
 {
443
-  unsigned n = 0;
444
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
443
+  unsigned          n  = 0;
444
+  cmDcm_t*          p  = _cmDcmHandleToPtr(h);
445
   assert( p->clp != NULL);
445
   assert( p->clp != NULL);
446
   const cmDcmCfg_t* cp = p->clp->cfg;
446
   const cmDcmCfg_t* cp = p->clp->cfg;
447
   for(; cp!= NULL; cp=cp->next)
447
   for(; cp!= NULL; cp=cp->next)
448
     if( cp->typeId == typeId )
448
     if( cp->typeId == typeId )
449
     {
449
     {
450
-      if( strcmp(cp->dcLabelStr,label)==0 )
450
+      if( strcmp(cp->dcLabelStr,label) == 0 )
451
         return n;
451
         return n;
452
       ++n;
452
       ++n;
453
     }
453
     }
479
   {
479
   {
480
     if( cp->cfgId > newCfgId )
480
     if( cp->cfgId > newCfgId )
481
       newCfgId = cp->cfgId;
481
       newCfgId = cp->cfgId;
482
-    ep = cp;
482
+    ep         = cp;
483
   }
483
   }
484
 
484
 
485
   // add one to the max cfgId to create a unique cfgId
485
   // add one to the max cfgId to create a unique cfgId
486
   newCfgId += 1;
486
   newCfgId += 1;
487
   
487
   
488
   // allocate a new cfg recd
488
   // allocate a new cfg recd
489
-  cp = cmMemAllocZ(cmDcmCfg_t,1);
489
+  cp             = cmMemAllocZ(cmDcmCfg_t,1);
490
   cp->dcLabelStr = cmMemAllocStr(dcLabelStr);
490
   cp->dcLabelStr = cmMemAllocStr(dcLabelStr);
491
   cp->cfgId      = newCfgId;
491
   cp->cfgId      = newCfgId;
492
   cp->typeId     = typeId;
492
   cp->typeId     = typeId;
514
 {
514
 {
515
   cmDcmCfg_t* cp;
515
   cmDcmCfg_t* cp;
516
   cmDcm_t*    p = _cmDcmHandleToPtr(h);
516
   cmDcm_t*    p = _cmDcmHandleToPtr(h);
517
-  unsigned i,j;
517
+  unsigned    i,j;
518
 
518
 
519
   // locate the cfg to delete
519
   // locate the cfg to delete
520
   if((cp = _cmDcmCfgLabelToPtr(p,typeId,dcLabelStr,true)) == NULL )
520
   if((cp = _cmDcmCfgLabelToPtr(p,typeId,dcLabelStr,true)) == NULL )
604
 
604
 
605
 cmDcRC_t cmDevCfgDeleteMap( cmDevCfgH_t h, cmTypeDcmId_t typeId, unsigned usrAppId, unsigned usrMapId )
605
 cmDcRC_t cmDevCfgDeleteMap( cmDevCfgH_t h, cmTypeDcmId_t typeId, unsigned usrAppId, unsigned usrMapId )
606
 {
606
 {
607
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
607
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
608
   cmDcmMap_t* mp;
608
   cmDcmMap_t* mp;
609
 
609
 
610
   if((mp = _cmDcmFindMap(p,typeId,usrAppId,usrMapId,false)) == NULL )
610
   if((mp = _cmDcmFindMap(p,typeId,usrAppId,usrMapId,false)) == NULL )
646
   if((cp = _cmDcmFindOrCreateCfg(p,kMidiDcmTId, dcLabelStr)) == NULL )
646
   if((cp = _cmDcmFindOrCreateCfg(p,kMidiDcmTId, dcLabelStr)) == NULL )
647
     return cmErrLastRC(&p->err);
647
     return cmErrLastRC(&p->err);
648
 
648
 
649
+  cp->u.m.label        = cp->dcLabelStr;
649
   cp->u.m.devLabelStr  = cmMemResizeStr(cp->u.m.devLabelStr,devLabelStr);
650
   cp->u.m.devLabelStr  = cmMemResizeStr(cp->u.m.devLabelStr,devLabelStr);
650
   cp->u.m.portLabelStr = cmMemResizeStr(cp->u.m.portLabelStr,portLabelStr);
651
   cp->u.m.portLabelStr = cmMemResizeStr(cp->u.m.portLabelStr,portLabelStr);
651
   cp->u.m.inputFl      = inputFl;
652
   cp->u.m.inputFl      = inputFl;
658
 
659
 
659
 const cmDcmMidi_t* cmDevCfgMidiCfg( cmDevCfgH_t h, unsigned cfgIdx )
660
 const cmDcmMidi_t* cmDevCfgMidiCfg( cmDevCfgH_t h, unsigned cfgIdx )
660
 {
661
 {
661
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
662
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
662
   cmDcmCfg_t* cp;
663
   cmDcmCfg_t* cp;
663
 
664
 
664
   if((cp = _cmDevCfgIndexToPtr(p, kMidiDcmTId, cfgIdx, true )) == NULL )
665
   if((cp = _cmDevCfgIndexToPtr(p, kMidiDcmTId, cfgIdx, true )) == NULL )
669
 
670
 
670
 const cmDcmMidi_t* cmDevCfgMidiDevMap( cmDevCfgH_t h, unsigned usrAppId, unsigned usrMapId )
671
 const cmDcmMidi_t* cmDevCfgMidiDevMap( cmDevCfgH_t h, unsigned usrAppId, unsigned usrMapId )
671
 {
672
 {
672
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
673
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
673
   cmDcmMap_t* mp;
674
   cmDcmMap_t* mp;
674
 
675
 
675
   if((mp =_cmDcmFindMap(p,kMidiDcmTId, usrAppId, usrMapId, true )) == NULL )
676
   if((mp =_cmDcmFindMap(p,kMidiDcmTId, usrAppId, usrMapId, true )) == NULL )
713
   double          srate,
714
   double          srate,
714
   bool            activeFl )
715
   bool            activeFl )
715
 {
716
 {
716
-  cmDcm_t*    p = _cmDcmHandleToPtr(h);
717
+  cmDcm_t*    p         = _cmDcmHandleToPtr(h);
717
   cmDcmCfg_t* cp;
718
   cmDcmCfg_t* cp;
718
-  unsigned    inDevIdx   = cmInvalidIdx;
719
-  unsigned    outDevIdx  = cmInvalidIdx;
719
+  unsigned    inDevIdx  = cmInvalidIdx;
720
+  unsigned    outDevIdx = cmInvalidIdx;
720
 
721
 
721
   // validate the label
722
   // validate the label
722
   if((dcLabelStr = _cmDcmTrimLabel(p,dcLabelStr,"Audio cfg")) == NULL)
723
   if((dcLabelStr = _cmDcmTrimLabel(p,dcLabelStr,"Audio cfg")) == NULL)
756
   unsigned inChCnt  = cmApDeviceChannelCount( inDevIdx,  true );
757
   unsigned inChCnt  = cmApDeviceChannelCount( inDevIdx,  true );
757
   unsigned outChCnt = cmApDeviceChannelCount( outDevIdx, false );
758
   unsigned outChCnt = cmApDeviceChannelCount( outDevIdx, false );
758
 
759
 
759
-  cp->u.a.inDevLabelStr                  = cmMemAllocStr(inDevNameStr==NULL?"":inDevNameStr);
760
-  cp->u.a.outDevLabelStr                 = cmMemAllocStr(outDevNameStr==NULL?"":outDevNameStr);
761
-  cp->u.a.activeFl                       = activeFl;
762
-  cp->u.a.audioSysArgs.rpt               = p->err.rpt;
763
-  cp->u.a.audioSysArgs.inDevIdx          = inDevIdx;
764
-  cp->u.a.audioSysArgs.outDevIdx         = outDevIdx;
765
-  cp->u.a.audioSysArgs.syncInputFl       = syncInputFl;
766
-  cp->u.a.audioSysArgs.msgQueueByteCnt   = msgQueueByteCnt;
767
-  cp->u.a.audioSysArgs.devFramesPerCycle = devFramesPerCycle;
768
-  cp->u.a.audioSysArgs.dspFramesPerCycle = dspFramesPerCycle;
769
-  cp->u.a.audioSysArgs.audioBufCnt       = audioBufCnt;
770
-  cp->u.a.audioSysArgs.srate             = srate;
771
-  cp->descStr = cmTsPrintfP(cp->descStr,"%sIn: Chs:%i %s\nOut: Chs:%i %s",activeFl?"":"INACTIVE ",inChCnt,cp->u.a.inDevLabelStr,outChCnt,cp->u.a.outDevLabelStr);
760
+  cp->u.a.label                       = cp->dcLabelStr;
761
+  cp->u.a.inDevLabelStr               = cmMemAllocStr(inDevNameStr==NULL?"":inDevNameStr);
762
+  cp->u.a.outDevLabelStr              = cmMemAllocStr(outDevNameStr==NULL?"":outDevNameStr);
763
+  cp->u.a.activeFl                    = activeFl;
764
+  cp->u.a.rtSysArgs.rpt               = p->err.rpt;
765
+  cp->u.a.rtSysArgs.inDevIdx          = inDevIdx;
766
+  cp->u.a.rtSysArgs.outDevIdx         = outDevIdx;
767
+  cp->u.a.rtSysArgs.syncInputFl       = syncInputFl;
768
+  cp->u.a.rtSysArgs.msgQueueByteCnt   = msgQueueByteCnt;
769
+  cp->u.a.rtSysArgs.devFramesPerCycle = devFramesPerCycle;
770
+  cp->u.a.rtSysArgs.dspFramesPerCycle = dspFramesPerCycle;
771
+  cp->u.a.rtSysArgs.audioBufCnt       = audioBufCnt;
772
+  cp->u.a.rtSysArgs.srate             = srate;
773
+  cp->descStr                         = cmTsPrintfP(cp->descStr,"%sIn: Chs:%i %s\nOut: Chs:%i %s",activeFl?"":"INACTIVE ",inChCnt,cp->u.a.inDevLabelStr,outChCnt,cp->u.a.outDevLabelStr);
772
   return kOkDcRC;  
774
   return kOkDcRC;  
773
 }
775
 }
774
 
776
 
776
 
778
 
777
 cmDcRC_t            cmDevCfgAudioSetDefaultCfgIndex( cmDevCfgH_t h, unsigned cfgIdx )
779
 cmDcRC_t            cmDevCfgAudioSetDefaultCfgIndex( cmDevCfgH_t h, unsigned cfgIdx )
778
 {
780
 {
779
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
781
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
780
 
782
 
781
   assert( p->clp != NULL );
783
   assert( p->clp != NULL );
782
 
784
 
803
 
805
 
804
 unsigned   cmDevCfgAudioGetDefaultCfgIndex( cmDevCfgH_t h )
806
 unsigned   cmDevCfgAudioGetDefaultCfgIndex( cmDevCfgH_t h )
805
 {
807
 {
806
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
808
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
807
 
809
 
808
   assert( p->clp != NULL );
810
   assert( p->clp != NULL );
809
 
811
 
823
 
825
 
824
 bool  cmDevCfgAudioIsDeviceActive( cmDevCfgH_t h, const cmChar_t* devNameStr, bool inputFl )
826
 bool  cmDevCfgAudioIsDeviceActive( cmDevCfgH_t h, const cmChar_t* devNameStr, bool inputFl )
825
 {
827
 {
826
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
828
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
827
 
829
 
828
   assert( p->clp != NULL );
830
   assert( p->clp != NULL );
829
 
831
 
851
 
853
 
852
 unsigned            cmDevCfgAudioActiveCount( cmDevCfgH_t h )
854
 unsigned            cmDevCfgAudioActiveCount( cmDevCfgH_t h )
853
 {
855
 {
854
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
856
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
855
 
857
 
856
   assert( p->clp != NULL );
858
   assert( p->clp != NULL );
857
 
859
 
867
 
869
 
868
 const cmChar_t*     cmDevCfgAudioActiveLabel( cmDevCfgH_t h, unsigned idx )
870
 const cmChar_t*     cmDevCfgAudioActiveLabel( cmDevCfgH_t h, unsigned idx )
869
 {
871
 {
870
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
872
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
871
 
873
 
872
   assert( p->clp != NULL );
874
   assert( p->clp != NULL );
873
 
875
 
888
 
890
 
889
 const cmDcmAudio_t* cmDevCfgAudioActiveCfg(   cmDevCfgH_t h, unsigned idx )
891
 const cmDcmAudio_t* cmDevCfgAudioActiveCfg(   cmDevCfgH_t h, unsigned idx )
890
 {
892
 {
891
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
893
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
892
 
894
 
893
   assert( p->clp != NULL );
895
   assert( p->clp != NULL );
894
 
896
 
909
 
911
 
910
 unsigned  cmDevCfgAudioActiveIndex( cmDevCfgH_t h, const cmChar_t* cfgLabel )
912
 unsigned  cmDevCfgAudioActiveIndex( cmDevCfgH_t h, const cmChar_t* cfgLabel )
911
 {
913
 {
912
-  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
914
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
913
 
915
 
914
   if( cfgLabel == NULL )
916
   if( cfgLabel == NULL )
915
     return cmInvalidIdx;
917
     return cmInvalidIdx;
933
 
935
 
934
 const cmDcmAudio_t* cmDevCfgAudioCfg( cmDevCfgH_t h, unsigned cfgIdx )
936
 const cmDcmAudio_t* cmDevCfgAudioCfg( cmDevCfgH_t h, unsigned cfgIdx )
935
 {
937
 {
936
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
938
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
937
   cmDcmCfg_t* cp;
939
   cmDcmCfg_t* cp;
938
 
940
 
939
   if((cp = _cmDevCfgIndexToPtr(p, kAudioDcmTId, cfgIdx, true )) == NULL )
941
   if((cp = _cmDevCfgIndexToPtr(p, kAudioDcmTId, cfgIdx, true )) == NULL )
944
 
946
 
945
 const cmDcmAudio_t* cmDevCfgAudioDevMap(    cmDevCfgH_t h, unsigned usrAppId, unsigned usrMapId )
947
 const cmDcmAudio_t* cmDevCfgAudioDevMap(    cmDevCfgH_t h, unsigned usrAppId, unsigned usrMapId )
946
 {
948
 {
947
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
949
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
948
   cmDcmMap_t* mp;
950
   cmDcmMap_t* mp;
949
 
951
 
950
   if((mp =_cmDcmFindMap(p,kAudioDcmTId, usrAppId, usrMapId, true )) == NULL )
952
   if((mp =_cmDcmFindMap(p,kAudioDcmTId, usrAppId, usrMapId, true )) == NULL )
955
 
957
 
956
 
958
 
957
 cmDcRC_t cmDevCfgNameNetPort(
959
 cmDcRC_t cmDevCfgNameNetPort(
958
-  cmDevCfgH_t      h,
960
+  cmDevCfgH_t     h,
959
   const cmChar_t* dcLabelStr,
961
   const cmChar_t* dcLabelStr,
960
   const cmChar_t* sockAddr,
962
   const cmChar_t* sockAddr,
961
   unsigned        portNumber,
963
   unsigned        portNumber,
963
   bool            activeFl)
965
   bool            activeFl)
964
 {
966
 {
965
 
967
 
966
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
968
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
967
   cmDcmCfg_t* cp;
969
   cmDcmCfg_t* cp;
968
 
970
 
969
   if( portNumber > 0xffff )
971
   if( portNumber > 0xffff )
978
   if((cp = _cmDcmFindOrCreateCfg(p,kNetDcmTId, dcLabelStr)) == NULL )
980
   if((cp = _cmDcmFindOrCreateCfg(p,kNetDcmTId, dcLabelStr)) == NULL )
979
     return cmErrLastRC(&p->err);
981
     return cmErrLastRC(&p->err);
980
 
982
 
983
+  cp->u.n.label      = cp->dcLabelStr;
981
   cp->u.n.sockAddr   = cmMemAllocStr(sockAddr);
984
   cp->u.n.sockAddr   = cmMemAllocStr(sockAddr);
982
   cp->u.n.portNumber = portNumber;
985
   cp->u.n.portNumber = portNumber;
983
   cp->u.n.localFl    = localFl;
986
   cp->u.n.localFl    = localFl;
984
   cp->u.n.activeFl   = activeFl;
987
   cp->u.n.activeFl   = activeFl;
985
-  cp->descStr = cmTsPrintfP(cp->descStr,"%s %s %s:%i",activeFl?"":"INACTIVE",localFl?"local":"remote",sockAddr,portNumber);
988
+  cp->descStr        = cmTsPrintfP(cp->descStr,"%s %s %s:%i",activeFl?"":"INACTIVE",localFl?"local":"remote",sockAddr,portNumber);
986
   
989
   
987
 
990
 
988
   return kOkDcRC;
991
   return kOkDcRC;
1028
 
1031
 
1029
 const cmDcmNet_t* cmDevCfgNetCfg( cmDevCfgH_t h, unsigned cfgIdx )
1032
 const cmDcmNet_t* cmDevCfgNetCfg( cmDevCfgH_t h, unsigned cfgIdx )
1030
 {
1033
 {
1031
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
1034
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
1032
   cmDcmCfg_t* cp;
1035
   cmDcmCfg_t* cp;
1033
 
1036
 
1034
   if((cp = _cmDevCfgIndexToPtr(p, kNetDcmTId, cfgIdx, true )) == NULL )
1037
   if((cp = _cmDevCfgIndexToPtr(p, kNetDcmTId, cfgIdx, true )) == NULL )
1039
 
1042
 
1040
 const cmDcmNet_t* cmDevCfgNetDevMap(    cmDevCfgH_t h, unsigned usrAppId, unsigned usrMapId )
1043
 const cmDcmNet_t* cmDevCfgNetDevMap(    cmDevCfgH_t h, unsigned usrAppId, unsigned usrMapId )
1041
 {
1044
 {
1042
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
1045
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
1043
   cmDcmMap_t* mp;
1046
   cmDcmMap_t* mp;
1044
 
1047
 
1045
   if((mp =_cmDcmFindMap(p,kNetDcmTId, usrAppId, usrMapId, true )) == NULL )
1048
   if((mp =_cmDcmFindMap(p,kNetDcmTId, usrAppId, usrMapId, true )) == NULL )
1050
 
1053
 
1051
 unsigned        cmDevCfgLocCount(  cmDevCfgH_t h )
1054
 unsigned        cmDevCfgLocCount(  cmDevCfgH_t h )
1052
 {
1055
 {
1053
-  unsigned n = 0;
1054
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
1056
+  unsigned          n  = 0;
1057
+  cmDcm_t*          p  = _cmDcmHandleToPtr(h);
1055
   const cmDcmLoc_t* lp = p->loc;
1058
   const cmDcmLoc_t* lp = p->loc;
1056
   for(; lp!=NULL; lp=lp->next)
1059
   for(; lp!=NULL; lp=lp->next)
1057
     ++n;
1060
     ++n;
1059
 }
1062
 }
1060
 const cmChar_t* cmDevCfgLocLabel(  cmDevCfgH_t h, unsigned locIdx )
1063
 const cmChar_t* cmDevCfgLocLabel(  cmDevCfgH_t h, unsigned locIdx )
1061
 {
1064
 {
1062
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
1065
+  cmDcm_t*          p  = _cmDcmHandleToPtr(h);
1063
   const cmDcmLoc_t* lp = p->loc;
1066
   const cmDcmLoc_t* lp = p->loc;
1064
-  unsigned i;
1067
+  unsigned          i;
1065
   for(i=0; lp!=NULL; lp=lp->next,++i)
1068
   for(i=0; lp!=NULL; lp=lp->next,++i)
1066
     if( i == locIdx )
1069
     if( i == locIdx )
1067
       return lp->labelStr;
1070
       return lp->labelStr;
1076
   if((locLabelStr = _cmDcmTrimLabel(p,locLabelStr,"location")) == NULL )
1079
   if((locLabelStr = _cmDcmTrimLabel(p,locLabelStr,"location")) == NULL )
1077
     return NULL;
1080
     return NULL;
1078
 
1081
 
1079
-  cmDcmLoc_t* lp = p->loc;
1082
+  cmDcmLoc_t* lp                          = p->loc;
1080
   for(; lp!=NULL; lp=lp->next)
1083
   for(; lp!=NULL; lp=lp->next)
1081
     if( strcmp(lp->labelStr,locLabelStr) == 0 )
1084
     if( strcmp(lp->labelStr,locLabelStr) == 0 )
1082
       return lp;
1085
       return lp;
1090
 
1093
 
1091
 cmDcRC_t cmDevCfgLocStore(  cmDevCfgH_t h, const cmChar_t* locLabelStr )
1094
 cmDcRC_t cmDevCfgLocStore(  cmDevCfgH_t h, const cmChar_t* locLabelStr )
1092
 {
1095
 {
1093
-  cmDcRC_t  rc = kOkDcRC;
1094
-  cmDcm_t*   p = _cmDcmHandleToPtr(h);
1096
+  cmDcRC_t rc = kOkDcRC;
1097
+  cmDcm_t* p = _cmDcmHandleToPtr(h);
1095
   unsigned i,j;
1098
   unsigned i,j;
1096
 
1099
 
1097
   // if this location label is already in use then it has already been stored.
1100
   // if this location label is already in use then it has already been stored.
1143
     cmDcmApp_t* oap = olp->app + i;
1146
     cmDcmApp_t* oap = olp->app + i;
1144
 
1147
 
1145
     //nap->usrAppId = oap->usrAppId;
1148
     //nap->usrAppId = oap->usrAppId;
1146
-    nap->activeFl = oap->activeFl;
1147
-    nap->mapCnt   = oap->mapCnt;
1148
-    nap->map      = cmMemAllocZ(cmDcmMap_t,nap->mapCnt);
1149
+    nap->activeFl   = oap->activeFl;
1150
+    nap->mapCnt     = oap->mapCnt;
1151
+    nap->map        = cmMemAllocZ(cmDcmMap_t,nap->mapCnt);
1149
 
1152
 
1150
     for(j=0; j<nap->mapCnt; ++j)
1153
     for(j=0; j<nap->mapCnt; ++j)
1151
     {
1154
     {
1156
       nmp->cfgId = omp->cfgId;
1159
       nmp->cfgId = omp->cfgId;
1157
 
1160
 
1158
       if( omp->tid != kInvalidDcmTId && omp->cfg->dcLabelStr != NULL )
1161
       if( omp->tid != kInvalidDcmTId && omp->cfg->dcLabelStr != NULL )
1159
-        nmp->cfg   = _cmDcmCfgLabelToPtr(p,nmp->tid,omp->cfg->dcLabelStr,true);
1162
+        nmp->cfg = _cmDcmCfgLabelToPtr(p,nmp->tid,omp->cfg->dcLabelStr,true);
1160
     }
1163
     }
1161
   }
1164
   }
1162
   
1165
   
1170
 
1173
 
1171
 cmDcRC_t cmDevCfgLocRecall( cmDevCfgH_t h, const cmChar_t* locLabelStr )
1174
 cmDcRC_t cmDevCfgLocRecall( cmDevCfgH_t h, const cmChar_t* locLabelStr )
1172
 {
1175
 {
1173
-  cmDcm_t*     p = _cmDcmHandleToPtr(h);
1176
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
1174
   cmDcmLoc_t* lp;
1177
   cmDcmLoc_t* lp;
1175
 
1178
 
1176
   if((lp = _cmDcmLocLabelToPtr(p,locLabelStr,true)) == NULL)
1179
   if((lp = _cmDcmLocLabelToPtr(p,locLabelStr,true)) == NULL)
1182
 }
1185
 }
1183
 cmDcRC_t cmDevCfgLocDelete( cmDevCfgH_t h, const cmChar_t* locLabelStr )
1186
 cmDcRC_t cmDevCfgLocDelete( cmDevCfgH_t h, const cmChar_t* locLabelStr )
1184
 {
1187
 {
1185
-  cmDcm_t*     p = _cmDcmHandleToPtr(h);
1188
+  cmDcm_t*    p = _cmDcmHandleToPtr(h);
1186
   cmDcmLoc_t* lp;
1189
   cmDcmLoc_t* lp;
1187
 
1190
 
1188
   if((lp = _cmDcmLocLabelToPtr(p,locLabelStr,true)) == NULL )
1191
   if((lp = _cmDcmLocLabelToPtr(p,locLabelStr,true)) == NULL )
1195
 
1198
 
1196
 unsigned cmDevCfgLocCurIndex(  cmDevCfgH_t h )
1199
 unsigned cmDevCfgLocCurIndex(  cmDevCfgH_t h )
1197
 {
1200
 {
1198
-  unsigned i;
1199
-  cmDcm_t* p = _cmDcmHandleToPtr(h);
1201
+  unsigned    i;
1202
+  cmDcm_t*    p  = _cmDcmHandleToPtr(h);
1200
   cmDcmLoc_t* lp = p->loc;
1203
   cmDcmLoc_t* lp = p->loc;
1201
   for(i=0; lp!=NULL; lp=lp->next,++i)
1204
   for(i=0; lp!=NULL; lp=lp->next,++i)
1202
     if( lp == p->clp )
1205
     if( lp == p->clp )
1216
 {
1219
 {
1217
   cmDcRC_t        rc          = kOkDcRC;
1220
   cmDcRC_t        rc          = kOkDcRC;
1218
   const cmChar_t* errLabelPtr = NULL;
1221
   const cmChar_t* errLabelPtr = NULL;
1219
-  cmJsonNode_t* cfgNp, *locArrNp;
1220
-  unsigned i,j;
1221
-  cmDevCfgH_t h;
1222
-  h.h = p;
1222
+  cmJsonNode_t*   cfgNp, *locArrNp;
1223
+  unsigned        i,j;
1224
+  cmDevCfgH_t     h;
1225
+  h.h                         = p;
1223
 
1226
 
1224
   // clear the all locations
1227
   // clear the all locations
1225
   _cmDcmFreeAllLocs(p);
1228
   _cmDcmFreeAllLocs(p);
1234
   // for each loc object
1237
   // for each loc object
1235
   for(i=0; i<cmJsonChildCount(locArrNp); ++i)
1238
   for(i=0; i<cmJsonChildCount(locArrNp); ++i)
1236
   {
1239
   {
1237
-    cmJsonNode_t* locObjNp, *cfgArrNp;
1240
+    cmJsonNode_t*   locObjNp, *cfgArrNp;
1238
     const cmChar_t* locLabelStr = NULL;
1241
     const cmChar_t* locLabelStr = NULL;
1239
 
1242
 
1240
     // get the loc object
1243
     // get the loc object
1249
     { return _cmDcmJsonNotFound(p,errLabelPtr); }
1252
     { return _cmDcmJsonNotFound(p,errLabelPtr); }
1250
 
1253
 
1251
     // create a new location recd
1254
     // create a new location recd
1252
-    cmDcmLoc_t* locPtr = NULL;
1255
+    cmDcmLoc_t* locPtr                             = NULL;
1253
     if((rc = _cmDcmNewLoc(p,locLabelStr,&locPtr)) != kOkDcRC )
1256
     if((rc = _cmDcmNewLoc(p,locLabelStr,&locPtr)) != kOkDcRC )
1254
       return cmErrMsg(&p->err,kJsonFailDcRC,"Location '%s' create failed.",cmStringNullGuard(locLabelStr));
1257
       return cmErrMsg(&p->err,kJsonFailDcRC,"Location '%s' create failed.",cmStringNullGuard(locLabelStr));
1255
 
1258
 
1274
         unsigned tid,cfgId;
1277
         unsigned tid,cfgId;
1275
         cmJsonNode_t* mapObjNp;
1278
         cmJsonNode_t* mapObjNp;
1276
 
1279
 
1277
-        if((mapObjNp = cmJsonArrayElement(mapArrNp,j))==NULL || cmJsonIsObject(mapObjNp)==false)
1280
+        if((mapObjNp = cmJsonArrayElement(mapArrNp,j)) == NULL || cmJsonIsObject(mapObjNp)==false)
1278
           return _cmDcmJsonSyntaxErr(p,"cfg object");
1281
           return _cmDcmJsonSyntaxErr(p,"cfg object");
1279
 
1282
 
1280
         if( cmJsonMemberValues( mapObjNp, &errLabelPtr, 
1283
         if( cmJsonMemberValues( mapObjNp, &errLabelPtr, 
1289
     // read each cfg object
1292
     // read each cfg object
1290
     for(j=0; j<cmJsonChildCount(cfgArrNp); ++j)
1293
     for(j=0; j<cmJsonChildCount(cfgArrNp); ++j)
1291
     {
1294
     {
1292
-      cmJsonNode_t* cfgObjNp;
1295
+      cmJsonNode_t*   cfgObjNp;
1293
       const cmChar_t* dcLabelStr;
1296
       const cmChar_t* dcLabelStr;
1294
       const cmChar_t* descStr;
1297
       const cmChar_t* descStr;
1295
-      unsigned cfgId, typeId;
1298
+      unsigned        cfgId, typeId;
1296
 
1299
 
1297
-      if((cfgObjNp = cmJsonArrayElement(cfgArrNp,j))==NULL || cmJsonIsObject(cfgObjNp)==false)
1300
+      if((cfgObjNp = cmJsonArrayElement(cfgArrNp,j)) == NULL || cmJsonIsObject(cfgObjNp)==false)
1298
         return _cmDcmJsonSyntaxErr(p,"cfg object");
1301
         return _cmDcmJsonSyntaxErr(p,"cfg object");
1299
       
1302
       
1300
       if( cmJsonMemberValues( cfgObjNp, &errLabelPtr,
1303
       if( cmJsonMemberValues( cfgObjNp, &errLabelPtr,
1331
           if( cmJsonMemberValues( cfgObjNp, &errLabelPtr,
1334
           if( cmJsonMemberValues( cfgObjNp, &errLabelPtr,
1332
               "inDevLabelStr",     kStringTId, &a.inDevLabelStr,
1335
               "inDevLabelStr",     kStringTId, &a.inDevLabelStr,
1333
               "outDevLabelStr",    kStringTId, &a.outDevLabelStr,
1336
               "outDevLabelStr",    kStringTId, &a.outDevLabelStr,
1334
-              "syncInputFl",       kBoolTId,   &a.audioSysArgs.syncInputFl,
1335
-              "msgQueueByteCnt",   kIntTId,    &a.audioSysArgs.msgQueueByteCnt,
1336
-              "devFramesPerCycle", kIntTId,    &a.audioSysArgs.devFramesPerCycle,
1337
-              "dspFramesPerCycle", kIntTId,    &a.audioSysArgs.dspFramesPerCycle,
1338
-              "audioBufCnt",       kIntTId,    &a.audioSysArgs.audioBufCnt,
1339
-              "srate",             kRealTId,   &a.audioSysArgs.srate,
1337
+              "syncInputFl",       kBoolTId,   &a.rtSysArgs.syncInputFl,
1338
+              "msgQueueByteCnt",   kIntTId,    &a.rtSysArgs.msgQueueByteCnt,
1339
+              "devFramesPerCycle", kIntTId,    &a.rtSysArgs.devFramesPerCycle,
1340
+              "dspFramesPerCycle", kIntTId,    &a.rtSysArgs.dspFramesPerCycle,
1341
+              "audioBufCnt",       kIntTId,    &a.rtSysArgs.audioBufCnt,
1342
+              "srate",             kRealTId,   &a.rtSysArgs.srate,
1340
               "active",            kBoolTId,   &a.activeFl,
1343
               "active",            kBoolTId,   &a.activeFl,
1341
               NULL ) != kOkJsRC )
1344
               NULL ) != kOkJsRC )
1342
           {
1345
           {
1344
             goto errLabel;
1347
             goto errLabel;
1345
           }
1348
           }
1346
 
1349
 
1347
-          if((rc = cmDevCfgNameAudioPort(h,dcLabelStr,a.inDevLabelStr,a.outDevLabelStr,
1348
-                a.audioSysArgs.syncInputFl,
1349
-                a.audioSysArgs.msgQueueByteCnt,
1350
-                a.audioSysArgs.devFramesPerCycle,
1351
-                a.audioSysArgs.dspFramesPerCycle,
1352
-                a.audioSysArgs.audioBufCnt,
1353
-                a.audioSysArgs.srate,
1350
+          if((rc              = cmDevCfgNameAudioPort(h,dcLabelStr,a.inDevLabelStr,a.outDevLabelStr,
1351
+                a.rtSysArgs.syncInputFl,
1352
+                a.rtSysArgs.msgQueueByteCnt,
1353
+                a.rtSysArgs.devFramesPerCycle,
1354
+                a.rtSysArgs.dspFramesPerCycle,
1355
+                a.rtSysArgs.audioBufCnt,
1356
+                a.rtSysArgs.srate,
1354
                 a.activeFl)) != kOkDcRC )
1357
                 a.activeFl)) != kOkDcRC )
1355
           {
1358
           {
1356
             goto errLabel;
1359
             goto errLabel;
1388
 
1391
 
1389
 cmDcRC_t _cmDevCfgWrite( cmDcm_t* p, cmJsonH_t jsH, cmJsonNode_t* rootObjPtr )
1392
 cmDcRC_t _cmDevCfgWrite( cmDcm_t* p, cmJsonH_t jsH, cmJsonNode_t* rootObjPtr )
1390
 {
1393
 {
1391
-  cmDcRC_t rc = kOkDcRC;
1394
+  cmDcRC_t          rc = kOkDcRC;
1392
   const cmDcmLoc_t* lp = p->loc;
1395
   const cmDcmLoc_t* lp = p->loc;
1393
   
1396
   
1394
   cmJsonNode_t* cfgNp = cmJsonInsertPairObject(jsH, rootObjPtr, "cfg" );
1397
   cmJsonNode_t* cfgNp = cmJsonInsertPairObject(jsH, rootObjPtr, "cfg" );
1463
           cmJsonInsertPairs(jsH, cfgObjNp,
1466
           cmJsonInsertPairs(jsH, cfgObjNp,
1464
             "inDevLabelStr",     kStringTId, cp->u.a.inDevLabelStr,
1467
             "inDevLabelStr",     kStringTId, cp->u.a.inDevLabelStr,
1465
             "outDevLabelStr",    kStringTId, cp->u.a.outDevLabelStr,
1468
             "outDevLabelStr",    kStringTId, cp->u.a.outDevLabelStr,
1466
-            "syncInputFl",       kBoolTId,   cp->u.a.audioSysArgs.syncInputFl,
1467
-            "msgQueueByteCnt",   kIntTId,    cp->u.a.audioSysArgs.msgQueueByteCnt,
1468
-            "devFramesPerCycle", kIntTId,    cp->u.a.audioSysArgs.devFramesPerCycle,
1469
-            "dspFramesPerCycle", kIntTId,    cp->u.a.audioSysArgs.dspFramesPerCycle,
1470
-            "audioBufCnt",       kIntTId,    cp->u.a.audioSysArgs.audioBufCnt,
1471
-            "srate",             kRealTId,   cp->u.a.audioSysArgs.srate,
1469
+            "syncInputFl",       kBoolTId,   cp->u.a.rtSysArgs.syncInputFl,
1470
+            "msgQueueByteCnt",   kIntTId,    cp->u.a.rtSysArgs.msgQueueByteCnt,
1471
+            "devFramesPerCycle", kIntTId,    cp->u.a.rtSysArgs.devFramesPerCycle,
1472
+            "dspFramesPerCycle", kIntTId,    cp->u.a.rtSysArgs.dspFramesPerCycle,
1473
+            "audioBufCnt",       kIntTId,    cp->u.a.rtSysArgs.audioBufCnt,
1474
+            "srate",             kRealTId,   cp->u.a.rtSysArgs.srate,
1472
             "active",            kBoolTId,   cp->u.a.activeFl,
1475
             "active",            kBoolTId,   cp->u.a.activeFl,
1473
             NULL );
1476
             NULL );
1474
           break;
1477
           break;

+ 8
- 5
cmDevCfg.h Näytä tiedosto

67
 
67
 
68
   typedef struct
68
   typedef struct
69
   {
69
   {
70
+    const cmChar_t* label;    // cfg label
70
     cmChar_t* devLabelStr;    // Midi device label.
71
     cmChar_t* devLabelStr;    // Midi device label.
71
     cmChar_t* portLabelStr;   // Midi device port label.
72
     cmChar_t* portLabelStr;   // Midi device port label.
72
     bool      inputFl;        // 'True' if this is an input port.
73
     bool      inputFl;        // 'True' if this is an input port.
76
 
77
 
77
   typedef struct
78
   typedef struct
78
   {
79
   {
80
+    const cmChar_t* label;         // cfg label
79
     cmChar_t*     inDevLabelStr;  // Input audio device label.
81
     cmChar_t*     inDevLabelStr;  // Input audio device label.
80
     cmChar_t*     outDevLabelStr; // Output audio device label.
82
     cmChar_t*     outDevLabelStr; // Output audio device label.
81
-    cmRtSysArgs_t audioSysArgs;   // Audio system  cfg recd
83
+    cmRtSysArgs_t rtSysArgs;      // RT system  cfg recd
82
     bool          dfltFl;         // true if this is the default audio cfg.
84
     bool          dfltFl;         // true if this is the default audio cfg.
83
     bool          activeFl;
85
     bool          activeFl;
84
   } cmDcmAudio_t;
86
   } cmDcmAudio_t;
85
 
87
 
86
   typedef struct              
88
   typedef struct              
87
   {
89
   {
88
-    cmChar_t* sockAddr;   // socket address.
89
-    unsigned  portNumber; // socket port number
90
-    bool      localFl;    // this is the local port
91
-    bool      activeFl;   // this port is active/inactive
90
+    const cmChar_t* label;      // cfg label
91
+    cmChar_t*       sockAddr;   // socket address.
92
+    unsigned        portNumber; // socket port number
93
+    bool            localFl;    // this is the local port
94
+    bool            activeFl;   // this port is active/inactive
92
   } cmDcmNet_t;
95
   } cmDcmNet_t;
93
 
96
 
94
   extern cmDevCfgH_t cmDevCfgNullHandle;
97
   extern cmDevCfgH_t cmDevCfgNullHandle;

Loading…
Peruuta
Tallenna