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
This commit is contained in:
parent
cc19e1ef99
commit
b248526fe3
|
@ -20,6 +20,7 @@
|
|||
<Option name="plugins-stop-with-transport" value="no"/>
|
||||
<Option name="no-sw-monitoring" value="no"/>
|
||||
<Option name="stop-recording-on-xrun" value="no"/>
|
||||
<Option name="create-xrun-marker" value="no"/>
|
||||
<Option name="stop-at-session-end" value="no"/>
|
||||
<Option name="auto-xfade" value="yes"/>
|
||||
<Option name="crossfades-active" value="1"/>
|
||||
|
|
|
@ -428,6 +428,7 @@
|
|||
<menuitem action='PeriodicSafetyBackups'/>
|
||||
<menuitem action='VerifyRemoveLastCapture'/>
|
||||
<menuitem action='StopRecordingOnXrun'/>
|
||||
<menuitem action='CreateXrunMarker'/>
|
||||
<menuitem action='StopTransportAtEndOfSession'/>
|
||||
<menuitem action='GainReduceFastTransport'/>
|
||||
<menuitem action='PrimaryClockDeltaEditCursor'/>
|
||||
|
|
|
@ -2916,16 +2916,33 @@ ARDOUR_UI::keyboard_settings () const
|
|||
return node;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::create_xrun_marker(nframes_t where)
|
||||
{
|
||||
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 ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (mem_fun(*this, &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 ()
|
||||
{
|
||||
|
|
|
@ -193,6 +193,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void do_transport_locate (nframes_t position);
|
||||
void halt_on_xrun_message ();
|
||||
void xrun_handler (nframes_t);
|
||||
void create_xrun_marker (nframes_t);
|
||||
|
||||
AudioClock primary_clock;
|
||||
AudioClock secondary_clock;
|
||||
|
@ -712,6 +714,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void toggle_VerifyRemoveLastCapture();
|
||||
void toggle_PeriodicSafetyBackups();
|
||||
void toggle_StopRecordingOnXrun();
|
||||
void toggle_CreateXrunMarker();
|
||||
void toggle_StopTransportAtEndOfSession();
|
||||
void toggle_GainReduceFastTransport();
|
||||
void toggle_LatchedSolo();
|
||||
|
|
|
@ -50,7 +50,7 @@ ARDOUR_UI::connect_to_session (Session *s)
|
|||
{
|
||||
session = s;
|
||||
|
||||
session->HaltOnXrun.connect (mem_fun(*this, &ARDOUR_UI::halt_on_xrun_message));
|
||||
session->Xrun.connect (mem_fun(*this, &ARDOUR_UI::xrun_handler));
|
||||
session->RecordStateChanged.connect (mem_fun (*this, &ARDOUR_UI::record_state_changed));
|
||||
|
||||
/* sensitize menu bar options that are now valid */
|
||||
|
|
|
@ -420,6 +420,7 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
|
||||
ActionManager::register_toggle_action (option_actions, X_("PeriodicSafetyBackups"), _("Make periodic safety backups"), mem_fun (*this, &ARDOUR_UI::toggle_PeriodicSafetyBackups));
|
||||
ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
|
||||
ActionManager::register_toggle_action (option_actions, X_("CreateXrunMarker"), _("Create marker at xrun location"), mem_fun (*this, &ARDOUR_UI::toggle_CreateXrunMarker));
|
||||
ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
|
||||
ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
|
||||
ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
|
||||
|
|
|
@ -465,6 +465,12 @@ ARDOUR_UI::toggle_StopRecordingOnXrun()
|
|||
ActionManager::toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun, &Configuration::get_stop_recording_on_xrun);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_CreateXrunMarker()
|
||||
{
|
||||
ActionManager::toggle_config_state ("options", "CreateXrunMarker", &Configuration::set_create_xrun_marker, &Configuration::get_create_xrun_marker);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_sync_order_keys ()
|
||||
{
|
||||
|
@ -1047,6 +1053,8 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
|
|||
ActionManager::map_some_state ("options", "PeriodicSafetyBackups", &Configuration::get_periodic_safety_backups);
|
||||
} else if (PARAM_IS ("stop-recording-on-xrun")) {
|
||||
ActionManager::map_some_state ("options", "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun);
|
||||
} else if (PARAM_IS ("create-xrun-marker")) {
|
||||
ActionManager::map_some_state ("options", "CreateXrunMarker", &Configuration::get_create_xrun_marker);
|
||||
} else if (PARAM_IS ("sync-all-route-ordering")) {
|
||||
ActionManager::map_some_state ("options", "SyncEditorAndMixerTrackOrder", &Configuration::get_sync_all_route_ordering);
|
||||
} else if (PARAM_IS ("stop-at-session-end")) {
|
||||
|
|
|
@ -456,7 +456,7 @@ class Editor : public PublicEditor
|
|||
|
||||
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
|
||||
void clear_marker_display ();
|
||||
void mouse_add_new_marker (nframes_t where, bool is_cd=false);
|
||||
void mouse_add_new_marker (nframes_t where, bool is_cd=false, bool is_xrun=false);
|
||||
void update_cd_marker_display ();
|
||||
void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
|
||||
|
||||
|
|
|
@ -388,13 +388,20 @@ Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_marker (nframes_t where, bool is_cd)
|
||||
Editor::mouse_add_new_marker (nframes_t where, bool is_cd, bool is_xrun)
|
||||
{
|
||||
string markername;
|
||||
string markername, markerprefix;
|
||||
int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark);
|
||||
|
||||
|
||||
if (is_xrun) {
|
||||
markerprefix = "xrun";
|
||||
flags = Location::IsMark;
|
||||
} else {
|
||||
markerprefix = "mark";
|
||||
}
|
||||
|
||||
if (session) {
|
||||
session->locations()->next_available_name(markername,"mark");
|
||||
session->locations()->next_available_name(markername, markerprefix);
|
||||
Location *location = new Location (where, where, markername, (Location::Flags) flags);
|
||||
session->begin_reversible_command (_("add marker"));
|
||||
XMLNode &before = session->locations()->get_state();
|
||||
|
|
|
@ -363,7 +363,7 @@ Editor::popup_ruler_menu (nframes_t where, ItemType t)
|
|||
|
||||
switch (t) {
|
||||
case MarkerBarItem:
|
||||
ruler_items.push_back (MenuElem (_("New location marker"), bind ( mem_fun(*this, &Editor::mouse_add_new_marker), where, false)));
|
||||
ruler_items.push_back (MenuElem (_("New location marker"), bind ( mem_fun(*this, &Editor::mouse_add_new_marker), where, false, false)));
|
||||
ruler_items.push_back (MenuElem (_("Clear all locations"), mem_fun(*this, &Editor::clear_markers)));
|
||||
ruler_items.push_back (MenuElem (_("Unhide locations"), mem_fun(*this, &Editor::unhide_markers)));
|
||||
ruler_items.push_back (SeparatorElem ());
|
||||
|
@ -381,7 +381,7 @@ Editor::popup_ruler_menu (nframes_t where, ItemType t)
|
|||
|
||||
case CdMarkerBarItem:
|
||||
// TODO
|
||||
ruler_items.push_back (MenuElem (_("New CD track marker"), bind ( mem_fun(*this, &Editor::mouse_add_new_marker), where, true)));
|
||||
ruler_items.push_back (MenuElem (_("New CD track marker"), bind ( mem_fun(*this, &Editor::mouse_add_new_marker), where, true, false)));
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
|
|||
virtual nframes64_t get_preferred_edit_position (bool ignore_playhead = false) = 0;
|
||||
virtual void toggle_meter_updating() = 0;
|
||||
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret) = 0;
|
||||
virtual void mouse_add_new_marker (nframes_t where, bool is_cd=false, bool is_xrun=false) = 0;
|
||||
|
||||
sigc::signal<void> ZoomFocusChanged;
|
||||
sigc::signal<void> ZoomChanged;
|
||||
|
|
|
@ -105,6 +105,7 @@ CONFIG_VARIABLE (bool, punch_out, "punch-out", false)
|
|||
CONFIG_VARIABLE (bool, plugins_stop_with_transport, "plugins-stop-with-transport", false)
|
||||
CONFIG_VARIABLE (bool, do_not_record_plugins, "do-not-record-plugins", false)
|
||||
CONFIG_VARIABLE (bool, stop_recording_on_xrun, "stop-recording-on-xrun", false)
|
||||
CONFIG_VARIABLE (bool, create_xrun_marker, "create-xrun-marker", false)
|
||||
CONFIG_VARIABLE (bool, stop_at_session_end, "stop-at-session-end", true)
|
||||
CONFIG_VARIABLE (bool, seamless_loop, "seamless-loop", false)
|
||||
CONFIG_VARIABLE (nframes_t, preroll, "preroll", 0)
|
||||
|
|
|
@ -346,7 +346,7 @@ class Session : public PBD::StatefulDestructible
|
|||
sigc::signal<void> TransportStateChange; /* generic */
|
||||
sigc::signal<void,nframes_t> PositionChanged; /* sent after any non-sequential motion */
|
||||
sigc::signal<void> DurationChanged;
|
||||
sigc::signal<void> HaltOnXrun;
|
||||
sigc::signal<void,nframes_t> Xrun;
|
||||
sigc::signal<void> TransportLooped;
|
||||
|
||||
sigc::signal<void,RouteList&> RouteAdded;
|
||||
|
|
|
@ -1229,9 +1229,9 @@ Session::engine_halted ()
|
|||
void
|
||||
Session::xrun_recovery ()
|
||||
{
|
||||
if (Config->get_stop_recording_on_xrun() && actively_recording()) {
|
||||
Xrun (transport_frame()); //EMIT SIGNAL
|
||||
|
||||
HaltOnXrun (); /* EMIT SIGNAL */
|
||||
if (Config->get_stop_recording_on_xrun() && actively_recording()) {
|
||||
|
||||
/* it didn't actually halt, but we need
|
||||
to handle things in the same way.
|
||||
|
|
Loading…
Reference in New Issue