Added MIDI type 2 support.
Fixed 2 clang warnings.