infinite = 0;
realtime = 0;
resume = 0;
+ audio_toggle = 0;
// Don't reset the change type for commands which don't perform the change
if(command != STOP) change_type = 0;
command = COMMAND_NONE;
this->playbackstart = command->playbackstart;
this->realtime = command->realtime;
this->resume = command->resume;
+ this->audio_toggle = command->audio_toggle;
}
TransportCommand& TransportCommand::operator=(TransportCommand &command)
case SLOW_FWD:
case CURRENT_FRAME:
return PLAY_FORWARD;
- break;
case SINGLE_FRAME_REWIND:
case NORMAL_REWIND:
case FAST_REWIND:
case SLOW_REWIND:
return PLAY_REVERSE;
- break;
default:
- return PLAY_FORWARD;
break;
}
+ return PLAY_FORWARD;
}
float TransportCommand::get_speed()
}
// Assume starting without pause
-void TransportCommand::set_playback_range(EDL *edl, int use_inout)
+void TransportCommand::set_playback_range(EDL *edl, int use_inout, int toggle_audio)
{
if(!edl) edl = this->edl;
-
-
-
switch(command)
{
case SLOW_FWD:
break;
}
+ audio_toggle = toggle_audio;
}
void TransportCommand::playback_range_adjust_inout()
end_position = edl->tracks->total_playable_length();
}
-
-
-
-
-
-
-
-
-
-
-
-
-
+void TransportCommand::playback_range_1frame()
+{
+ start_position = end_position = edl->local_session->get_selectionstart(1);
+ if( edl->session->frame_rate > 0 ) end_position += 1./edl->session->frame_rate;
+}
TransportQue::TransportQue()
delete output_lock;
}
-int TransportQue::send_command(int command,
- int change_type,
- EDL *new_edl,
- int realtime,
- int resume,
- int use_inout)
+int TransportQue::send_command(int command, int change_type, EDL *new_edl,
+ int realtime, int resume, int use_inout, int toggle_audio)
{
input_lock->lock("TransportQue::send_command 1");
this->command.command = command;
}
// Set playback range
- this->command.set_playback_range(new_edl, use_inout);
+ this->command.set_playback_range(new_edl, use_inout, toggle_audio);
}
input_lock->unlock();