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
   cmDspRC_t  cmDspUiMeterCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned minVarId,  unsigned maxVarId,  unsigned valVarId,  unsigned lblVarId );
392
   cmDspRC_t  cmDspUiMeterCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned minVarId,  unsigned maxVarId,  unsigned valVarId,  unsigned lblVarId );
393
   cmDspRC_t  cmDspUiButtonCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned outVarId, unsigned lblVarId );
393
   cmDspRC_t  cmDspUiButtonCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned outVarId, unsigned lblVarId );
394
   cmDspRC_t  cmDspUiLabelCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lblVarId,  unsigned alignVarId );
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
   cmDspRC_t  cmDspUiNewColumn(        cmDspCtx_t* ctx, unsigned colW );
397
   cmDspRC_t  cmDspUiNewColumn(        cmDspCtx_t* ctx, unsigned colW );
398
   cmDspRC_t  cmDspUiInsertHorzBorder( cmDspCtx_t* ctx );
398
   cmDspRC_t  cmDspUiInsertHorzBorder( cmDspCtx_t* ctx );

+ 4
- 2
dsp/cmDspKr.c View File

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

+ 5
- 3
dsp/cmDspUi.c View File

361
   return rc;
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
   cmDspRC_t    rc;
366
   cmDspRC_t    rc;
367
-  unsigned     arr[] = { valVarId, lblVarId  };
367
+  unsigned     arr[] = { valVarId, lblVarId, tlFileVarId, audPathVarId  };
368
   cmDspValue_t v;
368
   cmDspValue_t v;
369
   unsigned     vn    = sizeof(arr)/sizeof(arr[0]);
369
   unsigned     vn    = sizeof(arr)/sizeof(arr[0]);
370
   cmDsvSetUIntMtx(&v,arr,vn,1);
370
   cmDsvSetUIntMtx(&v,arr,vn,1);
379
 
379
 
380
   // Set the kUiDsvFl on the variables used for the min/max/def/val for this scalar
380
   // Set the kUiDsvFl on the variables used for the min/max/def/val for this scalar
381
   // Setting this flag will cause their values to be sent to the UI whenever they change.
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
   return rc;
385
   return rc;
384
 }
386
 }
385
 
387
 

Loading…
Cancel
Save