- if( use_inout ) {
- if( edl->local_session->inpoint_valid() )
- start_position = edl->local_session->get_inpoint();
- if( edl->local_session->outpoint_valid() )
- end_position = edl->local_session->get_outpoint();
- }
- else if( !EQUIV(start, end) ) {
- start_position = start;
- end_position = end;
- }
- else {
+ 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();