diff --git a/app/cmTimeLine.c b/app/cmTimeLine.c index f05b373..cab67dc 100644 --- a/app/cmTimeLine.c +++ b/app/cmTimeLine.c @@ -1282,6 +1282,28 @@ cmTlMarker_t* cmTimeLineMarkerAtTime( cmTlH_t h, unsigned seqId, unsigned return _cmTlMarkerObjPtr(p,op->obj,false); } +cmTlMarker_t* cmTimeLineMarkerFind( cmTlH_t h, const cmChar_t* markText ) +{ + unsigned i; + unsigned n = cmTimeLineSeqCount(h); + cmTlMarker_t* mop = NULL; + + for(i=0; iobj.name!=NULL && strcmp(mop->obj.name,markText)==0 ) + break; + + op = &mop->obj; + } + } + + return mop; + +} cmTlRC_t _cmTlParseErr( cmErr_t* err, const cmChar_t* errLabelPtr, unsigned idx, const cmChar_t* fn ) { diff --git a/app/cmTimeLine.h b/app/cmTimeLine.h index 5cdf8d6..ec6c5f7 100644 --- a/app/cmTimeLine.h +++ b/app/cmTimeLine.h @@ -166,6 +166,8 @@ extern "C" { cmTlMidiEvt_t* cmTimeLineMidiEvtAtTime( cmTlH_t h, unsigned seqId, unsigned seqSmpIdx ); cmTlMarker_t* cmTimeLineMarkerAtTime( cmTlH_t h, unsigned seqId, unsigned seqSmpIdx ); + cmTlMarker_t* cmTimeLineMarkerFind( cmTlH_t h, const cmChar_t* markText ); + // 'typeId' = kAudioFileTlId, kMidiFileTId, kMarkerTlId. // 'nameStr' and 'refObjNameStr' may be NULL. cmTlRC_t cmTimeLineInsert(