MIDIEncoder fix

This commit is contained in:
Jack Andersen 2016-06-20 21:08:33 -10:00
parent 4f7845f4ce
commit d77a18cde3
1 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@ void MIDIEncoder<Sender>::_sendContinuedValue(uint32_t val)
if (val >= 0x4000)
{
ptr = &send[0];
send[0] = (val / 0x4000) & 0x7f;
send[0] = 0x80 | ((val / 0x4000) & 0x7f);
send[1] = 0x80;
val &= 0x3fff;
}
@ -33,7 +34,7 @@ void MIDIEncoder<Sender>::_sendContinuedValue(uint32_t val)
{
if (!ptr)
ptr = &send[1];
send[1] = (val / 0x80) & 0x7f;
send[1] = 0x80 | ((val / 0x80) & 0x7f);
}
if (!ptr)