Updated midi_processing to fix RPG Maker loops

CQTexperiment
Chris Moeller 2015-08-01 19:16:41 -07:00
parent e9e446e1a2
commit 3b35ff2eda
1 changed files with 1 additions and 10 deletions

View File

@ -1085,26 +1085,17 @@ void midi_container::scan_for_loops( bool p_xmi_loops, bool p_marker_loops, bool
if ( event.m_type == midi_event::control_change &&
( event.m_data[ 0 ] == 110 || event.m_data[ 0 ] == 111 ) )
{
if ( event.m_data[ 0 ] == 110 ||
( event.m_data[ 0 ] == 111 && event.m_data[ 1 ] > 1 ) )
if ( event.m_data[ 0 ] == 110 )
{
emidi_commands_found = true;
break;
}
if ( event.m_data[ 1 ] == 0 )
{
if ( m_timestamp_loop_start[ subsong ] == ~0UL || m_timestamp_loop_start[ subsong ] > event.m_timestamp )
{
m_timestamp_loop_start[ subsong ] = event.m_timestamp;
}
}
else
{
if ( m_timestamp_loop_end[ subsong ] == ~0UL || m_timestamp_loop_end[ subsong ] < event.m_timestamp )
{
m_timestamp_loop_end[ subsong ] = event.m_timestamp;
}
}
}
}