Sfoglia il codice sorgente

cmMidiFile.c : Remove offset at beginning of each MIDI file by default.

master
kevin 8 anni fa
parent
commit
9088a7bb22
1 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. 9
    1
      cmMidiFile.c

+ 9
- 1
cmMidiFile.c Vedi File

430
   cmMidiTrackMsg_t* nextTrkMsg[ p->trkN ]; // next msg in each track
430
   cmMidiTrackMsg_t* nextTrkMsg[ p->trkN ]; // next msg in each track
431
   unsigned long long atick = 0;
431
   unsigned long long atick = 0;
432
   unsigned          i;
432
   unsigned          i;
433
+  bool              fl = true;
433
   
434
   
434
   // iniitalize nextTrkTick[] and nextTrkMsg[].
435
   // iniitalize nextTrkTick[] and nextTrkMsg[].
435
   for(i=0; i<p->trkN; ++i)
436
   for(i=0; i<p->trkN; ++i)
449
     if( k == cmInvalidIdx )
450
     if( k == cmInvalidIdx )
450
       break;
451
       break;
451
 
452
 
453
+    if( fl && nextTrkMsg[k]->dtick > 0 )
454
+    {
455
+      fl = false;
456
+      nextTrkMsg[k]->dtick = 1;
457
+      nextTrkMsg[k]->atick = 1;
458
+    }
459
+
452
     // store the current atick
460
     // store the current atick
453
     atick = nextTrkMsg[k]->atick;
461
     atick = nextTrkMsg[k]->atick;
454
 
462
 
1243
         if( sustainPedalDownMsg != NULL )
1251
         if( sustainPedalDownMsg != NULL )
1244
         {
1252
         {
1245
           // TODO:  the correct way to handle this is to maintain multiple sustain pedals 
1253
           // TODO:  the correct way to handle this is to maintain multiple sustain pedals 
1246
-          cmErrMsg(&p->err,kSustainPedalMfRC,"Sustain pedal down with no intervening sustain pedal up.");
1254
+          //cmErrMsg(&p->err,kSustainPedalMfRC,"Sustain pedal down with no intervening sustain pedal up.");
1247
         }
1255
         }
1248
         else
1256
         else
1249
         {
1257
         {

Loading…
Annulla
Salva