naudio / NAudio

Audio and MIDI library for .NET
MIT License
5.55k stars 1.1k forks source link

Read too far on MIDI using running status. #205

Open ofsp6070 opened 7 years ago

ofsp6070 commented 7 years ago

When trying to parse files using running status, naudio will throw a "Read Too Far" exception.

I included a file that triggers the issue.

notes.zip

melanchall commented 7 years ago

I want to confirm that the file is not corrupted. I've checked it with DryWetMIDI and it was succesfully read by this library without any errors.

markheath commented 7 years ago

thanks for reporting. I get a slightly different error with the latest code - SMTPE event error. There is some code in MidiEvent that attempts to deal with running status, but maybe there is an issue there. Looks like it has already read most (all?) of the events before bombing out