Closed Boscop closed 7 years ago
Thanks @Boscop! I don't have much experience with this crate yet so it's hard for me to review.
@nicklan any chance you might be able to take a quick look at this?
I added three more fixes: When writing SMF files:
The fix was just to put the variables in the loop that goes over the tracks when writing, so that they are reset before writing each track.
The third fix was: In the SMF conversion from type 0 (single-track) to 1 (multi-track) files, the times for the events were converted back to delta time at the end, but not for the meta-event track aka track 0. This caused some software like AIMP to report a very long song length (and of course meta events didn't get triggered at the right time). Now this is fixed too.
Nice work @Boscop :)
I'll leave this up a little longer to give nicklan a chance to reply, otherwise I'll merge.
@nicklan Any comments? :)
@mitchmindtree Can you merge, please :)
I added some things that I found necessary in my usage:
Err(Error::new(ErrorKind::InvalidData, "file ends before it should"))
.