ios15.x AVMIDIPlayer can't play midi file which use ios16.x create

when we use AVMIDIPlayer play midi file, it throw a exception: The operation couldn’t be completed. (com.apple.coreaudio.avfaudio error -3.)

and i find midi file's structure create at ios15.x is different with ios16.x

Replies

I found that the midi file generated by the ios16 system has added the system code, but the length of the dynamic byte is calculated incorrectly, resulting in a parsing error