summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-10-30 22:35:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-10-30 22:35:56 +0000
commit0e1f3ade67c54f957d84aad27044d67aa9c31da1 (patch)
treeca8854a133af5e07022a9971bce407e0f3fbe574 /gtk2_ardour
parentfa1c6e429b326c1470bc2454ba6570eda1475e2f (diff)
make space NOT exit from loop/range play, but actually stop; provide ToggleRollMaybe action (and menu item) to do that; if in seamless mode, do not just exit from loop play, but stop, because it won't work (buffers have wrong data in them)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5992 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour.menus.in1
-rw-r--r--gtk2_ardour/ardour_ui.cc15
-rw-r--r--gtk2_ardour/ardour_ui.h2
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc5
-rw-r--r--gtk2_ardour/mnemonic-us.bindings.in1
5 files changed, 18 insertions, 6 deletions
diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in
index 33dd8ae558..8aada68ce9 100644
--- a/gtk2_ardour/ardour.menus.in
+++ b/gtk2_ardour/ardour.menus.in
@@ -41,6 +41,7 @@
</menu>
<menuitem action='record-roll'/>
<menuitem action='Record'/>
+ <menuitem action='ToggleRollMaybe'/>
<menuitem action='ToggleRollForgetCapture'/>
<menu action="SetLoopMenu">
<menuitem action='set-loop-from-edit-range'/>
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 3a8d0748ce..e56e4ebd69 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1485,7 +1485,7 @@ ARDOUR_UI::transport_roll ()
}
void
-ARDOUR_UI::toggle_roll (bool with_abort)
+ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
{
if (!session) {
@@ -1509,10 +1509,19 @@ ARDOUR_UI::toggle_roll (bool with_abort)
bool rolling = session->transport_rolling();
bool affect_transport = true;
- if (rolling) {
+ if (rolling && roll_out_of_bounded_mode) {
/* drop out of loop/range playback but leave transport rolling */
if (session->get_play_loop()) {
- affect_transport = false;
+ if (Config->get_seamless_loop()) {
+ /* the disk buffers contain copies of the loop - we can't
+ just keep playing, so stop the transport. the user
+ can restart as they wish.
+ */
+ affect_transport = true;
+ } else {
+ /* disk buffers are normal, so we can keep playing */
+ affect_transport = false;
+ }
session->request_play_loop (false, true);
} else if (session->get_play_range ()) {
affect_transport = false;
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 03d433351a..9aa5401c82 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -578,7 +578,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void transport_forward (int option);
void transport_rewind (int option);
void transport_loop ();
- void toggle_roll (bool with_abort);
+ void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
bool _session_is_new;
void connect_to_session (ARDOUR::Session *);
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index ad1dda3de5..44a390ff01 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -249,10 +249,11 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
- ActionManager::register_action (transport_actions, X_("ToggleRoll"), _("Start/Stop"), bind (mem_fun (*this, &ARDOUR_UI::toggle_roll), false));
+ ActionManager::register_action (transport_actions, X_("ToggleRoll"), _("Start/Stop"), bind (mem_fun (*this, &ARDOUR_UI::toggle_roll), false, false));
+ ActionManager::register_action (transport_actions, X_("ToggleRollMaybe"), _("Start/Continue/Stop"), bind (mem_fun (*this, &ARDOUR_UI::toggle_roll), false, true));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
- ActionManager::register_action (transport_actions, X_("ToggleRollForgetCapture"), _("Stop + Forget Capture"), bind (mem_fun(*this, &ARDOUR_UI::toggle_roll), true));
+ ActionManager::register_action (transport_actions, X_("ToggleRollForgetCapture"), _("Stop + Forget Capture"), bind (mem_fun(*this, &ARDOUR_UI::toggle_roll), true, false));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
diff --git a/gtk2_ardour/mnemonic-us.bindings.in b/gtk2_ardour/mnemonic-us.bindings.in
index 832e9715f5..f5d776a0bc 100644
--- a/gtk2_ardour/mnemonic-us.bindings.in
+++ b/gtk2_ardour/mnemonic-us.bindings.in
@@ -16,6 +16,7 @@
(gtk_accel_path "<Actions>/Editor/extend-range-to-start-of-region" "leftanglebracket")
(gtk_accel_path "<Actions>/Transport/ToggleRoll" "space")
+(gtk_accel_path "<Actions>/Transport/ToggleRollMaybe" "<%PRIMARY%><%SECONDARY%>space")
(gtk_accel_path "<Actions>/Editor/play-edit-range" "<%SECONDARY%>space")
(gtk_accel_path "<Actions>/Editor/play-from-edit-point-and-return" "<%PRIMARY%><%TERTIARY%>space")
(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<%PRIMARY%>space")