diff options
author | Strangerke | 2014-12-02 23:59:36 +0100 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:57:35 -0500 |
commit | 8267b5d2abe9bd5f620502bd436acb74453daa06 (patch) | |
tree | cb52cd5e0b358fa6b6ebcfb0303a9783b2e5ad96 /engines | |
parent | f9685533292b0301ed9770439e55f39fbc934a7f (diff) | |
download | scummvm-rg350-8267b5d2abe9bd5f620502bd436acb74453daa06.tar.gz scummvm-rg350-8267b5d2abe9bd5f620502bd436acb74453daa06.tar.bz2 scummvm-rg350-8267b5d2abe9bd5f620502bd436acb74453daa06.zip |
ACCESS: Skip the unknown midi file format used by the demo
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/sound.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index bf11d6a624..7dab0a75f7 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -182,27 +182,29 @@ void MusicManager::midiPlay() { error("midiPlay() wrong music resource size"); } - if (READ_BE_UINT32(_music->data()) != MKTAG('F', 'O', 'R', 'M')) - error("midiPlay() Unexpected signature"); - stop(); - _parser = MidiParser::createParser_XMIDI(); + if (READ_BE_UINT32(_music->data()) != MKTAG('F', 'O', 'R', 'M')) { + warning("midiPlay() Unexpected signature"); + _isPlaying = false; + } else { + _parser = MidiParser::createParser_XMIDI(); - if (!_parser->loadMusic(_music->data(), _music->_size)) - error("midiPlay() wrong music resource"); + if (!_parser->loadMusic(_music->data(), _music->_size)) + error("midiPlay() wrong music resource"); - _parser->setTrack(0); - _parser->setMidiDriver(this); - _parser->setTimerRate(_driver->getBaseTempo()); - _parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1); - _parser->property(MidiParser::mpSendSustainOffOnNotesOff, 1); + _parser->setTrack(0); + _parser->setMidiDriver(this); + _parser->setTimerRate(_driver->getBaseTempo()); + _parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1); + _parser->property(MidiParser::mpSendSustainOffOnNotesOff, 1); - // Handle music looping - _parser->property(MidiParser::mpAutoLoop, _isLooping); + // Handle music looping + _parser->property(MidiParser::mpAutoLoop, _isLooping); - setVolume(127); - _isPlaying = true; + setVolume(127); + _isPlaying = true; + } } bool MusicManager::checkMidiDone() { |