summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2008-02-13 14:38:49 +0000
committerDoug McLain <doug@nostar.net>2008-02-13 14:38:49 +0000
commitb248526fe35a846af0f62985c18e62e3e8817f9c (patch)
treece04389cc34fde7eba640aea5bb729dd850a788f /gtk2_ardour/ardour_ui.cc
parentcc19e1ef9993ad6fafb4f7fd0028ebec6a1b7f0a (diff)
add option to create xrun markers on the location markerbar
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3048 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index cbb39d5e8b..b9b38d650a 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2917,16 +2917,33 @@ ARDOUR_UI::keyboard_settings () const
}
void
-ARDOUR_UI::halt_on_xrun_message ()
+ARDOUR_UI::create_xrun_marker(nframes_t where)
{
- ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::halt_on_xrun_message));
+ ENSURE_GUI_THREAD (bind(mem_fun(*this, &ARDOUR_UI::create_xrun_marker), where));
+ editor->mouse_add_new_marker (where, false, true);
+}
+void
+ARDOUR_UI::halt_on_xrun_message ()
+{
MessageDialog msg (*editor,
_("Recording was stopped because your system could not keep up."));
msg.run ();
}
void
+ARDOUR_UI::xrun_handler(nframes_t where)
+{
+ if (Config->get_create_xrun_marker() && session->actively_recording()) {
+ create_xrun_marker(where);
+ }
+
+ if (Config->get_stop_recording_on_xrun() && session->actively_recording()) {
+ halt_on_xrun_message ();
+ }
+}
+
+void
ARDOUR_UI::disk_overrun_handler ()
{
ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));