+ double length = edl->tracks->total_playable_length();
+ double frame_period = 1.0 / edl->session->frame_rate;
+
+ displacement = 0;
+ audio_toggle = toggle_audio;
+ play_loop = loop_play;
+
+ start_position = use_inout && edl->local_session->inpoint_valid() ?
+ edl->local_session->get_inpoint() :
+ !loop_play ? edl->local_session->get_selectionstart(1) : 0;
+ end_position = use_inout && edl->local_session->outpoint_valid() ?
+ edl->local_session->get_outpoint() :
+ !loop_play ? edl->local_session->get_selectionend(1) : length;
+
+ if( !use_inout && EQUIV(start_position, end_position) ) {
+// starting play at or past end_position, play to end_position of media (for mixers)
+ if( start_position >= length )
+ length = edl->tracks->total_length();
+ switch( command ) {