Browse Source

Added tlFile and audPath variables to timeline DSP ui ctl.

master
kpl 11 years ago
parent
commit
80492669cf
3 changed files with 10 additions and 6 deletions
  1. 1
    1
      dsp/cmDspClass.h
  2. 4
    2
      dsp/cmDspKr.c
  3. 5
    3
      dsp/cmDspUi.c

+ 1
- 1
dsp/cmDspClass.h View File

@@ -392,7 +392,7 @@ extern "C" {
392 392
   cmDspRC_t  cmDspUiMeterCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned minVarId,  unsigned maxVarId,  unsigned valVarId,  unsigned lblVarId );
393 393
   cmDspRC_t  cmDspUiButtonCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned outVarId, unsigned lblVarId );
394 394
   cmDspRC_t  cmDspUiLabelCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lblVarId,  unsigned alignVarId );
395
-  cmDspRC_t  cmDspUiTimeLineCreate(cmDspCtx_t* ctx,cmDspInst_t* inst, unsigned valVarId,  unsigned lblVarId );
395
+  cmDspRC_t  cmDspUiTimeLineCreate(cmDspCtx_t* ctx,cmDspInst_t* inst, unsigned valVarId,  unsigned lblVarId, unsigned tlFileId, unsigned audPathId );
396 396
 
397 397
   cmDspRC_t  cmDspUiNewColumn(        cmDspCtx_t* ctx, unsigned colW );
398 398
   cmDspRC_t  cmDspUiInsertHorzBorder( cmDspCtx_t* ctx );

+ 4
- 2
dsp/cmDspKr.c View File

@@ -230,7 +230,9 @@ struct cmDspClass_str* cmKrClassCons( cmDspCtx_t* ctx )
230 230
 enum
231 231
 {
232 232
   kValTlId,
233
-  kLblTlId
233
+  kLblTlId,
234
+  kTlFileTlId,
235
+  kAudPathTlId
234 236
 };
235 237
 
236 238
 cmDspClass_t _cmTimeLineDC;
@@ -252,7 +254,7 @@ cmDspInst_t*  _cmDspTimeLineAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsig
252 254
   cmDspTimeLine_t* p = cmDspInstAlloc(cmDspTimeLine_t,ctx,classPtr,args,instSymId,id,storeSymId,va_cnt,vl);
253 255
 
254 256
   // create the UI control
255
-  cmDspUiTimeLineCreate(ctx,&p->inst,kValTlId,kLblTlId);
257
+  cmDspUiTimeLineCreate(ctx,&p->inst,kValTlId,kLblTlId,kTlFileTlId,kAudPathTlId);
256 258
 
257 259
   return &p->inst;
258 260
 }

+ 5
- 3
dsp/cmDspUi.c View File

@@ -361,10 +361,10 @@ cmDspRC_t  cmDspUiLabelCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lbl
361 361
   return rc;
362 362
 }
363 363
 
364
-cmDspRC_t  cmDspUiTimeLineCreate(   cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId )
364
+cmDspRC_t  cmDspUiTimeLineCreate(   cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId, unsigned tlFileVarId, unsigned audPathVarId )
365 365
 {
366 366
   cmDspRC_t    rc;
367
-  unsigned     arr[] = { valVarId, lblVarId  };
367
+  unsigned     arr[] = { valVarId, lblVarId, tlFileVarId, audPathVarId  };
368 368
   cmDspValue_t v;
369 369
   unsigned     vn    = sizeof(arr)/sizeof(arr[0]);
370 370
   cmDsvSetUIntMtx(&v,arr,vn,1);
@@ -379,7 +379,9 @@ cmDspRC_t  cmDspUiTimeLineCreate(   cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned
379 379
 
380 380
   // Set the kUiDsvFl on the variables used for the min/max/def/val for this scalar
381 381
   // Setting this flag will cause their values to be sent to the UI whenever they change.
382
-  cmDspInstVarSetFlags( ctx, inst, valVarId, kUiDsvFl );
382
+  cmDspInstVarSetFlags( ctx, inst, valVarId,     kUiDsvFl );
383
+  cmDspInstVarSetFlags( ctx, inst, tlFileVarId,  kUiDsvFl );
384
+  cmDspInstVarSetFlags( ctx, inst, audPathVarId, kUiDsvFl );
383 385
   return rc;
384 386
 }
385 387
 

Loading…
Cancel
Save