Selaa lähdekoodia

cmXScore.c : Added explicit variable for grace note duration.

master
kevin 8 vuotta sitten
vanhempi
commit
b66c936a99
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5
    4
      app/cmXScore.c

+ 5
- 4
app/cmXScore.c Näytä tiedosto

@@ -1525,8 +1525,9 @@ void _cmXScoreGraceOverlayTime( cmXScore_t* p, unsigned graceGroupId, cmXsNote_t
1525 1525
 // grace note groups - which must be in reverse time order.
1526 1526
 cmXsRC_t _cmXScoreProcessGraceNotes( cmXScore_t* p )
1527 1527
 {
1528
-  cmXsRC_t    rc = kOkXsRC;
1529
-  unsigned    graceGroupId = 1;
1528
+  cmXsRC_t rc           = kOkXsRC;
1529
+  unsigned graceGroupId = 1;
1530
+  double   graceDurSec  = 1.0/15.0;  // duration of all grace notes in seconds
1530 1531
   
1531 1532
   for(; 1; ++graceGroupId)
1532 1533
   {
@@ -1567,7 +1568,7 @@ cmXsRC_t _cmXScoreProcessGraceNotes( cmXScore_t* p )
1567 1568
               
1568 1569
             // set each grace note to have 1/20 of a second duration
1569 1570
             if( cmIsFlag(np->flags,kGraceXsFl) )
1570
-              np->duration = floor(ticksPerSec / 20.0);
1571
+              np->duration = floor(ticksPerSec * graceDurSec);
1571 1572
 
1572 1573
             gN += 1;
1573 1574
           }
@@ -1639,7 +1640,7 @@ cmXsRC_t _cmXScoreProcessGraceNotes( cmXScore_t* p )
1639 1640
     mp = gn0p->meas;
1640 1641
     for(i=0; n0p != gn1p; n1p=n1p->slink )
1641 1642
     {
1642
-      // if we are crossing a measure boundardy
1643
+      // if we are crossing a measure boundary
1643 1644
       if( n1p == NULL )
1644 1645
       {
1645 1646
         mp  = mp->link;

Loading…
Peruuta
Tallenna