cmTakeSeqBldr.c : Added 'muid' to cmScTrkMidiTsb_t.
Fixed bug in _cmTsbScoreTrkFree().
This commit is contained in:
parent
857dae7646
commit
9b86614e57
@ -21,7 +21,8 @@
|
|||||||
// Score track record: Map a score event to a MIDI event.
|
// Score track record: Map a score event to a MIDI event.
|
||||||
typedef struct cmScTrkMidiTsb_str
|
typedef struct cmScTrkMidiTsb_str
|
||||||
{
|
{
|
||||||
unsigned mni; // midi note index as an offset from the take marker
|
unsigned mni; // MIDI note index as an offset from the take marker
|
||||||
|
unsigned muid; // MIDI file msg unique id
|
||||||
unsigned scEvtIdx; // score event index this not is assoc'd with or -1 if it did not match
|
unsigned scEvtIdx; // score event index this not is assoc'd with or -1 if it did not match
|
||||||
unsigned flags; // flags from cmScMatcherResult_t
|
unsigned flags; // flags from cmScMatcherResult_t
|
||||||
} cmScTrkMidiTsb_t;
|
} cmScTrkMidiTsb_t;
|
||||||
@ -114,10 +115,13 @@ cmTsbRC_t _cmTsbScoreTrkFree( cmTsb_t* p )
|
|||||||
goto errLabel;
|
goto errLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0; i<p->scTrkTakeN; ++i)
|
if( p->scTrkTakeV != NULL )
|
||||||
cmMemPtrFree(&p->scTrkTakeV[i].midiV);
|
{
|
||||||
|
for(i=0; i<p->scTrkTakeN; ++i)
|
||||||
|
cmMemPtrFree(&p->scTrkTakeV[i].midiV);
|
||||||
|
|
||||||
cmMemPtrFree(&p->scTrkTakeV);
|
cmMemPtrFree(&p->scTrkTakeV);
|
||||||
|
}
|
||||||
|
|
||||||
if( cmTimeLineFinalize(&p->tlH) != kOkTlRC )
|
if( cmTimeLineFinalize(&p->tlH) != kOkTlRC )
|
||||||
rc = cmErrMsg(&p->err,kTimeLineFailTsbRC,"Time line object finalize failed.");
|
rc = cmErrMsg(&p->err,kTimeLineFailTsbRC,"Time line object finalize failed.");
|
||||||
@ -231,6 +235,7 @@ cmTsbRC_t _cmTsbLoadScoreTrkFile( cmTsb_t* p, const cmChar_t* scoreTrkFn )
|
|||||||
// parse the note record
|
// parse the note record
|
||||||
if((jsRC = cmJsonMemberValues( noteObj, &errMsg,
|
if((jsRC = cmJsonMemberValues( noteObj, &errMsg,
|
||||||
"mni", kIntTId, &p->scTrkTakeV[i].midiV[j].mni,
|
"mni", kIntTId, &p->scTrkTakeV[i].midiV[j].mni,
|
||||||
|
"muid", kIntTId, &p->scTrkTakeV[i].midiV[j].muid,
|
||||||
"scEvtIdx", kIntTId, &p->scTrkTakeV[i].midiV[j].scEvtIdx,
|
"scEvtIdx", kIntTId, &p->scTrkTakeV[i].midiV[j].scEvtIdx,
|
||||||
"flags", kIntTId, &p->scTrkTakeV[i].midiV[j].flags,
|
"flags", kIntTId, &p->scTrkTakeV[i].midiV[j].flags,
|
||||||
NULL)) != kOkJsRC )
|
NULL)) != kOkJsRC )
|
||||||
|
Loading…
Reference in New Issue
Block a user