mirror of https://github.com/AxioDL/boo.git
Allow MIDIDecoder to handle multiple messages per pass
This commit is contained in:
parent
f73e4f08fa
commit
fd2a92e2c2
|
@ -41,9 +41,8 @@ MIDIDecoder::receiveBytes(std::vector<uint8_t>::const_iterator begin,
|
|||
std::vector<uint8_t>::const_iterator end)
|
||||
{
|
||||
std::vector<uint8_t>::const_iterator it = begin;
|
||||
if (it == end)
|
||||
return begin;
|
||||
|
||||
while (it != end)
|
||||
{
|
||||
uint8_t a = *it++;
|
||||
uint8_t b;
|
||||
if (a & 0x80)
|
||||
|
@ -61,8 +60,7 @@ MIDIDecoder::receiveBytes(std::vector<uint8_t>::const_iterator begin,
|
|||
uint32_t length;
|
||||
_readContinuedValue(it, end, length);
|
||||
it += length;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
uint8_t chan = m_status & 0xf;
|
||||
switch (Status(m_status & 0xf0))
|
||||
|
@ -195,14 +193,16 @@ MIDIDecoder::receiveBytes(std::vector<uint8_t>::const_iterator begin,
|
|||
case Status::SysExTerm:
|
||||
case Status::TimingClock:
|
||||
case Status::ActiveSensing:
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return it;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue