Support MIDIDumpEnabled=1 to syslog

network
probonopd 4 days ago
parent 46ccb9ca12
commit 84525eb9e4
  1. 12
      src/mididevice.cpp

@ -144,17 +144,17 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
if ( pMessage[0] != MIDI_TIMING_CLOCK
&& pMessage[0] != MIDI_ACTIVE_SENSING)
{
printf ("MIDI%u: %02X\n", nCable, (unsigned) pMessage[0]);
LOGNOTE ("MIDI%u: %02X\n", nCable, (unsigned) pMessage[0]);
}
break;
case 2:
printf ("MIDI%u: %02X %02X\n", nCable,
LOGNOTE ("MIDI%u: %02X %02X\n", nCable,
(unsigned) pMessage[0], (unsigned) pMessage[1]);
break;
case 3:
printf ("MIDI%u: %02X %02X %02X\n", nCable,
LOGNOTE ("MIDI%u: %02X %02X %02X\n", nCable,
(unsigned) pMessage[0], (unsigned) pMessage[1],
(unsigned) pMessage[2]);
break;
@ -162,17 +162,17 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
switch(pMessage[0])
{
case MIDI_SYSTEM_EXCLUSIVE_BEGIN:
printf("MIDI%u: SysEx data length: [%d]:",nCable, uint16_t(nLength));
LOGNOTE("MIDI%u: SysEx data length: [%d]:",nCable, uint16_t(nLength));
for (uint16_t i = 0; i < nLength; i++)
{
if((i % 16) == 0)
printf("\n%04d:",i);
printf(" 0x%02x",pMessage[i]);
}
printf("\n");
LOGNOTE("\n");
break;
default:
printf("MIDI%u: Unhandled MIDI event type %0x02x\n",nCable,pMessage[0]);
LOGNOTE("MIDI%u: Unhandled MIDI event type %0x02x\n",nCable,pMessage[0]);
}
break;
}

Loading…
Cancel
Save