cmMidiFile.c : Removed UID return value from cmMidiFileInsertTrackMsg().
This commit is contained in:
parent
d14744ed4d
commit
19b90719aa
16
cmMidiFile.c
16
cmMidiFile.c
@ -1368,13 +1368,10 @@ cmMfRC_t cmMidiFileInsertMsg( cmMidiFileH_t h, unsigned uid, int dtick, cmMidiBy
|
||||
|
||||
}
|
||||
|
||||
cmMfRC_t cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg, unsigned* uidRef )
|
||||
cmMfRC_t cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg )
|
||||
{
|
||||
_cmMidiFile_t* p = _cmMidiFileHandleToPtr(h);
|
||||
|
||||
if( uidRef != NULL )
|
||||
*uidRef = cmInvalidId;
|
||||
|
||||
// validate the track index
|
||||
if( trkIdx >= p->trkN )
|
||||
return cmErrMsg(&p->err,kInvalidTrkIndexMfRC,"The track index (%i) is invalid.",trkIdx);
|
||||
@ -1398,9 +1395,6 @@ cmMfRC_t cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMi
|
||||
memcpy((void*)m->u.voidPtr,msg->u.voidPtr,msg->byteCnt);
|
||||
}
|
||||
|
||||
if( uidRef != NULL )
|
||||
*uidRef = m->uid;
|
||||
|
||||
cmMidiTrackMsg_t* m0 = NULL; // msg before insertion
|
||||
cmMidiTrackMsg_t* m1 = p->trkV[trkIdx].base; // msg after insertion
|
||||
|
||||
@ -1461,7 +1455,7 @@ cmMfRC_t cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMi
|
||||
|
||||
}
|
||||
|
||||
cmMfRC_t cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1, unsigned* uidRef )
|
||||
cmMfRC_t cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1 )
|
||||
{
|
||||
cmMidiTrackMsg_t m;
|
||||
cmMidiChMsg_t cm;
|
||||
@ -1480,10 +1474,10 @@ cmMfRC_t cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned
|
||||
|
||||
assert( m.status >= kNoteOffMdId && m.status <= kPbendMdId );
|
||||
|
||||
return cmMidiFileInsertTrackMsg(h,trkIdx,&m,uidRef);
|
||||
return cmMidiFileInsertTrackMsg(h,trkIdx,&m);
|
||||
}
|
||||
|
||||
cmMfRC_t cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm, unsigned* uidRef )
|
||||
cmMfRC_t cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm )
|
||||
{
|
||||
cmMidiTrackMsg_t m;
|
||||
|
||||
@ -1494,7 +1488,7 @@ cmMfRC_t cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsign
|
||||
m.metaId = kTempoMdId;
|
||||
m.u.iVal = 60000000/bpm; // convert BPM to microsPerQN
|
||||
|
||||
return cmMidiFileInsertTrackMsg(h,trkIdx,&m,uidRef);
|
||||
return cmMidiFileInsertTrackMsg(h,trkIdx,&m);
|
||||
}
|
||||
|
||||
|
||||
|
@ -185,9 +185,9 @@ extern "C" {
|
||||
// byteCnt - used to allocate storage for the data element in 'cmMidiTrackMsg_t.u'
|
||||
// u - the message data
|
||||
//
|
||||
cmMfRC_t cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg, unsigned* uidRef );
|
||||
cmMfRC_t cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1, unsigned* uidRef );
|
||||
cmMfRC_t cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm, unsigned* uidRef );
|
||||
cmMfRC_t cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg );
|
||||
cmMfRC_t cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1 );
|
||||
cmMfRC_t cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm );
|
||||
|
||||
// Return a pointer to the first msg at or after 'usecsOffs' or kInvalidIdx if no
|
||||
// msg exists after 'usecsOffs'. Note that 'usecOffs' is an offset from the beginning
|
||||
|
Loading…
Reference in New Issue
Block a user