Pārlūkot izejas kodu

cmMidiFile.c : Removed UID return value from cmMidiFileInsertTrackMsg().

master
kevin 8 gadus atpakaļ
vecāks
revīzija
19b90719aa
2 mainītis faili ar 8 papildinājumiem un 14 dzēšanām
  1. 5
    11
      cmMidiFile.c
  2. 3
    3
      cmMidiFile.h

+ 5
- 11
cmMidiFile.c Parādīt failu

@@ -1368,13 +1368,10 @@ cmMfRC_t cmMidiFileInsertMsg( cmMidiFileH_t h, unsigned uid, int dtick, cmMidiBy
1368 1368
 
1369 1369
 }
1370 1370
 
1371
-cmMfRC_t  cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg, unsigned* uidRef )
1371
+cmMfRC_t  cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg )
1372 1372
 {
1373 1373
   _cmMidiFile_t* p = _cmMidiFileHandleToPtr(h);
1374 1374
 
1375
-  if( uidRef != NULL )
1376
-    *uidRef = cmInvalidId;
1377
-
1378 1375
   // validate the track index
1379 1376
   if( trkIdx >= p->trkN )
1380 1377
     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
1398 1395
     memcpy((void*)m->u.voidPtr,msg->u.voidPtr,msg->byteCnt);
1399 1396
   }
1400 1397
 
1401
-  if( uidRef != NULL )
1402
-    *uidRef = m->uid;
1403
-  
1404 1398
   cmMidiTrackMsg_t* m0 = NULL;                  // msg before insertion
1405 1399
   cmMidiTrackMsg_t* m1 = p->trkV[trkIdx].base;  // msg after insertion
1406 1400
 
@@ -1461,7 +1455,7 @@ cmMfRC_t  cmMidiFileInsertTrackMsg( cmMidiFileH_t h, unsigned trkIdx, const cmMi
1461 1455
    
1462 1456
 }
1463 1457
 
1464
-cmMfRC_t  cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1, unsigned* uidRef )
1458
+cmMfRC_t  cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1 )
1465 1459
 {
1466 1460
   cmMidiTrackMsg_t m;
1467 1461
   cmMidiChMsg_t   cm;
@@ -1480,10 +1474,10 @@ cmMfRC_t  cmMidiFileInsertTrackChMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned
1480 1474
 
1481 1475
   assert( m.status >= kNoteOffMdId && m.status <= kPbendMdId );
1482 1476
   
1483
-  return cmMidiFileInsertTrackMsg(h,trkIdx,&m,uidRef);
1477
+  return cmMidiFileInsertTrackMsg(h,trkIdx,&m);
1484 1478
 }
1485 1479
 
1486
-cmMfRC_t  cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm, unsigned* uidRef )
1480
+cmMfRC_t  cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm )
1487 1481
 {
1488 1482
   cmMidiTrackMsg_t m;
1489 1483
 
@@ -1494,7 +1488,7 @@ cmMfRC_t  cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsign
1494 1488
   m.metaId     = kTempoMdId;
1495 1489
   m.u.iVal     = 60000000/bpm;  // convert BPM to microsPerQN
1496 1490
   
1497
-  return cmMidiFileInsertTrackMsg(h,trkIdx,&m,uidRef);
1491
+  return cmMidiFileInsertTrackMsg(h,trkIdx,&m);
1498 1492
 }
1499 1493
 
1500 1494
 

+ 3
- 3
cmMidiFile.h Parādīt failu

@@ -185,9 +185,9 @@ extern "C" {
185 185
   //   byteCnt  - used to allocate storage for the data element in 'cmMidiTrackMsg_t.u'
186 186
   //   u        - the message data
187 187
   //
188
-  cmMfRC_t             cmMidiFileInsertTrackMsg(     cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg, unsigned* uidRef );
189
-  cmMfRC_t             cmMidiFileInsertTrackChMsg(   cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1, unsigned* uidRef );
190
-  cmMfRC_t             cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm, unsigned* uidRef );
188
+  cmMfRC_t             cmMidiFileInsertTrackMsg(     cmMidiFileH_t h, unsigned trkIdx, const cmMidiTrackMsg_t* msg );
189
+  cmMfRC_t             cmMidiFileInsertTrackChMsg(   cmMidiFileH_t h, unsigned trkIdx, unsigned atick, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1 );
190
+  cmMfRC_t             cmMidFileInsertTrackTempoMsg( cmMidiFileH_t h, unsigned trkIdx, unsigned atick, unsigned bpm );
191 191
   
192 192
   // Return a pointer to the first msg at or after 'usecsOffs' or kInvalidIdx if no
193 193
   // msg exists after 'usecsOffs'.  Note that 'usecOffs' is an offset from the beginning

Notiek ielāde…
Atcelt
Saglabāt