Now MIDI decoder will stop playing if init/startup fails, rather than attempting to play with no SoundFonts loaded.

CQTexperiment
Chris Moeller 2016-05-09 21:56:44 -07:00
parent 4c0e43863f
commit 026380fe40
1 changed files with 2 additions and 1 deletions

View File

@ -245,7 +245,8 @@ static OSType getOSType(const char * in_)
soundFontsAssigned = YES;
}
player->Play( (float *) buf, frames );
if ( player->Play( (float *) buf, frames ) < frames )
return -1;
if ( !repeatone && framesRead + frames > localFramesLength ) {
if ( framesFade ) {