transport_tearoff_hbox.pack_start (*toggle_box, false, false, 4);
transport_tearoff_hbox.pack_start (alert_box, false, false);
+
+ if (Profile->get_sae()) {
+ Image* img = manage (new Image ((::get_icon (X_("sae")))));
+ transport_tearoff_hbox.pack_end (*img, false, false, 6);
+ }
}
void
}
nframes64_t
-Editor::get_preferred_edit_position()
+Editor::get_preferred_edit_position (bool ignore_playhead)
{
bool ignored;
nframes64_t where = 0;
+ EditPoint ep = _edit_point;
if (entered_marker) {
return entered_marker->position();
}
- switch (_edit_point) {
+ if (ignore_playhead && ep == EditAtPlayhead) {
+ ep = EditAtSelectedMarker;
+ }
+
+ switch (ep) {
case EditAtPlayhead:
where = session->audible_frame();
break;
void reset_zoom (double);
void reposition_and_zoom (nframes_t, double);
- nframes64_t get_preferred_edit_position ();
+ nframes64_t get_preferred_edit_position (bool ignore_playhead = false);
bool update_mouse_speed ();
bool decelerate_mouse_speed ();
nframes64_t start_frame;
nframes64_t return_frame;
- if (session->transport_rolling()) {
- session->request_stop ();
- return;
+ /* don't reset the return frame if its already set */
+
+ if ((return_frame = session->requested_return_frame()) < 0) {
+ return_frame = session->audible_frame();
}
- switch (_edit_point) {
- case EditAtPlayhead:
- session->request_transport_speed (1.0f);
- break;
-
- default:
- return_frame = session->transport_frame();
- start_frame = get_preferred_edit_position ();
- if (start_frame >= 0) {
- session->request_roll_at_and_return (start_frame, return_frame);
- }
- break;
+ start_frame = get_preferred_edit_position (true);
+
+ if (start_frame >= 0) {
+ session->request_roll_at_and_return (start_frame, return_frame);
}
}
virtual void remove_last_capture () = 0;
virtual void maximise_editing_space() = 0;
virtual void restore_editing_space() = 0;
- virtual nframes64_t get_preferred_edit_position () = 0;
+ virtual nframes64_t get_preferred_edit_position (bool ignore_playhead = false) = 0;
sigc::signal<void> ZoomFocusChanged;
sigc::signal<void> ZoomChanged;
items.push_back (SeparatorElem());
build_remote_control_menu ();
+ build_automation_action_menu ();
+
if (!Profile->get_sae()) {
items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
- build_automation_action_menu ();
items.push_back (MenuElem (_("Automation"), *automation_action_menu));
items.push_back (SeparatorElem());
}
CONFIG_VARIABLE (float, automation_interval, "automation-interval", 50)
CONFIG_VARIABLE (bool, sync_all_route_ordering, "sync-all-route-ordering", true)
CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", true)
+CONFIG_VARIABLE (std::string, keyboard_layout, "keyboard-layout", "ansi")
+CONFIG_VARIABLE (std::string, default_bindings, "default-bindings", "ardour")
/* denormal management */
nframes_t transport_frame () const {return _transport_frame; }
nframes_t audible_frame () const;
+ nframes64_t requested_return_frame() const { return _requested_return_frame; }
enum PullupFormat {
pullup_Plus4Plus1,
nframes_t _last_slave_transport_frame;
nframes_t maximum_output_latency;
nframes_t last_stop_frame;
- nframes64_t requested_return_frame;
+ nframes64_t _requested_return_frame;
vector<Sample *> _passthru_buffers;
vector<Sample *> _silent_buffers;
vector<Sample *> _send_buffers;
case Event::LocateRollLocate:
// locate is handled by ::request_roll_at_and_return()
- requested_return_frame = ev->target_frame;
+ _requested_return_frame = ev->target_frame;
set_transport_speed (ev->speed, true);
break;
transport_sub_state = 0;
_transport_frame = 0;
last_stop_frame = 0;
- requested_return_frame = -1;
+ _requested_return_frame = -1;
end_location = new Location (0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd)));
start_location = new Location (0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart)));
_end_location_is_free = true;
if ((Config->get_slave_source() == None && Config->get_auto_return()) ||
(post_transport_work & PostTransportLocate) ||
- (requested_return_frame >= 0) ||
+ (_requested_return_frame >= 0) ||
synced_to_jack()) {
if (pending_locate_flush) {
if (((Config->get_slave_source() == None && Config->get_auto_return()) ||
synced_to_jack() ||
- requested_return_frame >= 0) &&
+ _requested_return_frame >= 0) &&
!(post_transport_work & PostTransportLocate)) {
bool do_locate = false;
- if (requested_return_frame >= 0) {
- _transport_frame = requested_return_frame;
- requested_return_frame = -1;
+ if (_requested_return_frame >= 0) {
+ _transport_frame = _requested_return_frame;
+ _requested_return_frame = -1;
do_locate = true;
} else {
_transport_frame = last_stop_frame;
void
Session::request_roll_at_and_return (nframes_t start, nframes_t return_to)
{
- request_stop ();
request_locate (start, false);
-
Event *ev = new Event (Event::LocateRollLocate, Event::Add, Event::Immediate, return_to, 1.0);
queue_event (ev);
}