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:
parent
1fb3d61b56
commit
3b4810aab4
22 changed files with 243 additions and 23 deletions
|
@ -47,7 +47,7 @@ public:
|
|||
int open();
|
||||
bool isOpen() const { return hdl != NULL; }
|
||||
void close();
|
||||
void send(uint32 b);
|
||||
void send(uint32 b) override;
|
||||
void sysEx(const byte *msg, uint16 length);
|
||||
|
||||
private:
|
||||
|
@ -80,6 +80,8 @@ void MidiDriver_Sndio::send(uint32 b) {
|
|||
unsigned char buf[4];
|
||||
unsigned int len;
|
||||
|
||||
midiDriverCommonSend(b);
|
||||
|
||||
if (!hdl)
|
||||
return;
|
||||
buf[0] = b & 0xff;
|
||||
|
@ -107,6 +109,8 @@ void MidiDriver_Sndio::sysEx(const byte *msg, uint16 length) {
|
|||
|
||||
assert(length + 2 <= ARRAYSIZE(buf));
|
||||
|
||||
midiDriverCommonSysEx(msg, length);
|
||||
|
||||
// Add SysEx frame
|
||||
buf[0] = 0xF0;
|
||||
memcpy(buf + 1, msg, length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue