range-checking for keys of input-events
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1343 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -127,6 +127,15 @@ void midiPort::processInEvent( const midiEvent & _me, const midiTime & _time )
|
||||
if( ( mode() == Input || mode() == Duplex ) &&
|
||||
( inputChannel()-1 == _me.m_channel || inputChannel() == 0 ) )
|
||||
{
|
||||
if( _me.m_type == MidiNoteOn ||
|
||||
_me.m_type == MidiNoteOff ||
|
||||
_me.m_type == MidiKeyPressure )
|
||||
{
|
||||
if( _me.key() < 0 || _me.key() >= NumKeys )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
midiEvent ev = _me;
|
||||
if( m_defaultVelocityInEnabledModel.value() == TRUE &&
|
||||
_me.velocity() > 0 )
|
||||
|
||||
Reference in New Issue
Block a user