AUDIO: Added dump-midi mechanism

This mechanism is enabled by '--dump-midi' command line parameter.
The midi events are printed to screen, and dumped to 'dump.mid' file.
This commit is contained in:
Zvika Haramaty 2020-02-19 19:51:53 +02:00 committed by Filippos Karapetis
parent 1fb3d61b56
commit 3b4810aab4
22 changed files with 243 additions and 23 deletions

View file

@ -58,7 +58,7 @@ public:
int open();
bool isOpen() const { return mOutPort != 0 && mDest != 0; }
void close();
void send(uint32 b);
void send(uint32 b) override;
void sysEx(const byte *msg, uint16 length);
private:
@ -118,6 +118,8 @@ void MidiDriver_CoreMIDI::close() {
void MidiDriver_CoreMIDI::send(uint32 b) {
assert(isOpen());
midiDriverCommonSend(b);
// Extract the MIDI data
byte status_byte = (b & 0x000000FF);
byte first_byte = (b & 0x0000FF00) >> 8;