Updated midi_processing to fix RPG Maker loops
parent
e9e446e1a2
commit
3b35ff2eda
|
@ -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 &&
|
if ( event.m_type == midi_event::control_change &&
|
||||||
( event.m_data[ 0 ] == 110 || event.m_data[ 0 ] == 111 ) )
|
( event.m_data[ 0 ] == 110 || event.m_data[ 0 ] == 111 ) )
|
||||||
{
|
{
|
||||||
if ( event.m_data[ 0 ] == 110 ||
|
if ( event.m_data[ 0 ] == 110 )
|
||||||
( event.m_data[ 0 ] == 111 && event.m_data[ 1 ] > 1 ) )
|
|
||||||
{
|
{
|
||||||
emidi_commands_found = true;
|
emidi_commands_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( event.m_data[ 1 ] == 0 )
|
|
||||||
{
|
{
|
||||||
if ( m_timestamp_loop_start[ subsong ] == ~0UL || m_timestamp_loop_start[ subsong ] > event.m_timestamp )
|
if ( m_timestamp_loop_start[ subsong ] == ~0UL || m_timestamp_loop_start[ subsong ] > event.m_timestamp )
|
||||||
{
|
{
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue