Explorar el Código

cmScore.c : Changed invalid MIDI velocity from fatal error to a warning.

master
kevin larke hace 7 años
padre
commit
59dbe1df10
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6
    1
      app/cmScore.c

+ 6
- 1
app/cmScore.c Ver fichero

745
     return cmErrMsg(&p->err,kSyntaxErrScRC,"Unable to convert the scientific pitch '%s' to a MIDI value. ");
745
     return cmErrMsg(&p->err,kSyntaxErrScRC,"Unable to convert the scientific pitch '%s' to a MIDI value. ");
746
 
746
 
747
   if((midiVel = cmCsvCellUInt( p->cH,rowIdx,kD1ColScIdx)) >= kInvalidMidiVelocity )
747
   if((midiVel = cmCsvCellUInt( p->cH,rowIdx,kD1ColScIdx)) >= kInvalidMidiVelocity )
748
-    return cmErrMsg(&p->err,kSyntaxErrScRC,"An invalid MIDI velocity (%i) was encountered.",midiVel);
748
+  {
749
+    //return cmErrMsg(&p->err,kSyntaxErrScRC,"An invalid MIDI velocity (%i) was encountered.",midiVel);
750
+    midiVel = 64;
751
+    cmErrWarnMsg(&p->err,kSyntaxErrScRC,"An invalilid MIDI velocity (%i) was encountered.",midiVel);
752
+  }
753
+    
749
   
754
   
750
   // get the sec's field - or DBL_MAX if it is not set
755
   // get the sec's field - or DBL_MAX if it is not set
751
   if((secs =  cmCsvCellDouble(p->cH, rowIdx, kSecsColScIdx )) == DBL_MAX) // Returns DBL_MAX on error.
756
   if((secs =  cmCsvCellDouble(p->cH, rowIdx, kSecsColScIdx )) == DBL_MAX) // Returns DBL_MAX on error.

Loading…
Cancelar
Guardar