diff options
author | Doug McLain <doug@nostar.net> | 2008-02-13 14:38:49 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2008-02-13 14:38:49 +0000 |
commit | b248526fe35a846af0f62985c18e62e3e8817f9c (patch) | |
tree | ce04389cc34fde7eba640aea5bb729dd850a788f /gtk2_ardour/ardour_ui.cc | |
parent | cc19e1ef9993ad6fafb4f7fd0028ebec6a1b7f0a (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.cc | 21 |
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)); |