Closed ArthurCose closed 1 year ago
Thanks for reporting the issue and for the pull request 😄 Your proposed fix looks good. After merging this pull request, would you mind if I changed the naming convention of the part you created to my personal preference?
I wouldn't mind, thank you
I've released v1.1.1 which fixes this issue. Thanks for the PR 😄
I have this midi file that ends the track chunk with multiple track end events:
Currently, the MidiFile struct will see the track end and immediately attempt to process the next event as an MTrk header giving me an InvalidChunkType for "??/?". Tracking the number of bytes read and skipping excess bytes (the extra event) allows the file to be fully read + play.
I have a fork that wraps the reader to track bytes read for resolving how many bytes to skip, not sure if there's a better solution.