From 80492669cfb8d1b44066084a7f50a8743ddc74c2 Mon Sep 17 00:00:00 2001 From: kpl Date: Fri, 16 Nov 2012 10:01:57 -0800 Subject: [PATCH] Added tlFile and audPath variables to timeline DSP ui ctl. --- dsp/cmDspClass.h | 2 +- dsp/cmDspKr.c | 6 ++++-- dsp/cmDspUi.c | 8 +++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dsp/cmDspClass.h b/dsp/cmDspClass.h index 50b68a7..919af7f 100644 --- a/dsp/cmDspClass.h +++ b/dsp/cmDspClass.h @@ -392,7 +392,7 @@ extern "C" { cmDspRC_t cmDspUiMeterCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned minVarId, unsigned maxVarId, unsigned valVarId, unsigned lblVarId ); cmDspRC_t cmDspUiButtonCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned outVarId, unsigned lblVarId ); cmDspRC_t cmDspUiLabelCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lblVarId, unsigned alignVarId ); - cmDspRC_t cmDspUiTimeLineCreate(cmDspCtx_t* ctx,cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId ); + cmDspRC_t cmDspUiTimeLineCreate(cmDspCtx_t* ctx,cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId, unsigned tlFileId, unsigned audPathId ); cmDspRC_t cmDspUiNewColumn( cmDspCtx_t* ctx, unsigned colW ); cmDspRC_t cmDspUiInsertHorzBorder( cmDspCtx_t* ctx ); diff --git a/dsp/cmDspKr.c b/dsp/cmDspKr.c index 97bfa4c..63d2f80 100644 --- a/dsp/cmDspKr.c +++ b/dsp/cmDspKr.c @@ -230,7 +230,9 @@ struct cmDspClass_str* cmKrClassCons( cmDspCtx_t* ctx ) enum { kValTlId, - kLblTlId + kLblTlId, + kTlFileTlId, + kAudPathTlId }; cmDspClass_t _cmTimeLineDC; @@ -252,7 +254,7 @@ cmDspInst_t* _cmDspTimeLineAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsig cmDspTimeLine_t* p = cmDspInstAlloc(cmDspTimeLine_t,ctx,classPtr,args,instSymId,id,storeSymId,va_cnt,vl); // create the UI control - cmDspUiTimeLineCreate(ctx,&p->inst,kValTlId,kLblTlId); + cmDspUiTimeLineCreate(ctx,&p->inst,kValTlId,kLblTlId,kTlFileTlId,kAudPathTlId); return &p->inst; } diff --git a/dsp/cmDspUi.c b/dsp/cmDspUi.c index 0e9a408..58cdb3e 100644 --- a/dsp/cmDspUi.c +++ b/dsp/cmDspUi.c @@ -361,10 +361,10 @@ cmDspRC_t cmDspUiLabelCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lbl return rc; } -cmDspRC_t cmDspUiTimeLineCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId ) +cmDspRC_t cmDspUiTimeLineCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId, unsigned tlFileVarId, unsigned audPathVarId ) { cmDspRC_t rc; - unsigned arr[] = { valVarId, lblVarId }; + unsigned arr[] = { valVarId, lblVarId, tlFileVarId, audPathVarId }; cmDspValue_t v; unsigned vn = sizeof(arr)/sizeof(arr[0]); cmDsvSetUIntMtx(&v,arr,vn,1); @@ -379,7 +379,9 @@ cmDspRC_t cmDspUiTimeLineCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned // Set the kUiDsvFl on the variables used for the min/max/def/val for this scalar // Setting this flag will cause their values to be sent to the UI whenever they change. - cmDspInstVarSetFlags( ctx, inst, valVarId, kUiDsvFl ); + cmDspInstVarSetFlags( ctx, inst, valVarId, kUiDsvFl ); + cmDspInstVarSetFlags( ctx, inst, tlFileVarId, kUiDsvFl ); + cmDspInstVarSetFlags( ctx, inst, audPathVarId, kUiDsvFl ); return rc; }