On Wed Feb 7 13:44:11 2024 +0000, Yuxuan Shui wrote:
I honestly think it doesn't make logical sense to split the parsing code.
This is how Wine is written though. You should take it slowly and build things more incrementally.
Actually, you should start even by writing *many* more tests. Very simple tests, one MIDI event type at a time, and then implement its parsing and playback. It'll help you see and show how things should be written, and avoid any unnecessary arguing about whether things are necessary or not.
To find answers to your questions below, I've written some very basic tests in [diff](/uploads/47197544f463ae62d96ae5fc4e4051e6/diff), and it shows already that there's plenty of aspects that should be implemented differently. Please take a look and extend them with whatever you need to validate that your implementation is correct (and take smaller steps).