a) persist whether the end marker should move at first capture in the session file
b) prevent transport motion if stop-at-session-end is true c) ensure that (more) menu items that provide control over Configuration object options are in the correct state at startup d) Configuration options removed from "have a session" sensitivity toggling e) removed functionally empty default_keys.cc git-svn-id: svn://localhost/trunk/ardour2@433 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ed48cdb3df
commit
9643eb4b23
|
@ -89,7 +89,6 @@ color_manager.cc
|
|||
crossfade_edit.cc
|
||||
crossfade_view.cc
|
||||
curvetest.cc
|
||||
default_keys.cc
|
||||
editing.cc
|
||||
editor.cc
|
||||
editor_actions.cc
|
||||
|
|
|
@ -228,7 +228,6 @@ ARDOUR_UI::set_engine (AudioEngine& e)
|
|||
_tooltips.enable();
|
||||
|
||||
keyboard = new Keyboard;
|
||||
install_keybindings ();
|
||||
|
||||
string meter_path;
|
||||
|
||||
|
|
|
@ -576,7 +576,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void connect_dependents_to_session (ARDOUR::Session *);
|
||||
void we_have_dependents ();
|
||||
void setup_keybindings ();
|
||||
void setup_options ();
|
||||
void setup_session_options ();
|
||||
void setup_config_options ();
|
||||
|
||||
guint32 last_key_press_time;
|
||||
|
||||
|
@ -623,7 +624,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
/* Keymap handling */
|
||||
|
||||
void install_keybindings ();
|
||||
Glib::RefPtr<Gtk::ActionGroup> get_common_actions();
|
||||
void install_actions ();
|
||||
void test_binding_action (const char *);
|
||||
|
|
|
@ -99,7 +99,7 @@ ARDOUR_UI::connect_to_session (Session *s)
|
|||
sfdb->set_session (s);
|
||||
}
|
||||
|
||||
setup_options ();
|
||||
setup_session_options ();
|
||||
|
||||
Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink));
|
||||
Blink.connect (mem_fun(*this, &ARDOUR_UI::solo_blink));
|
||||
|
|
|
@ -399,26 +399,21 @@ ARDOUR_UI::install_actions ()
|
|||
RadioAction::Group monitoring_group;
|
||||
|
||||
act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseHardwareMonitoring"), _("Hardware monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseHardwareMonitoring));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseSoftwareMonitoring"), _("Software monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseSoftwareMonitoring));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseExternalMonitoring"), _("External monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseExternalMonitoring));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
/* Configuration object options (i.e. not session specific) */
|
||||
|
||||
ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
|
||||
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_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
|
||||
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));
|
||||
|
||||
/* session options */
|
||||
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
|
||||
|
@ -427,6 +422,7 @@ ARDOUR_UI::install_actions ()
|
|||
RadioAction::Group solo_group;
|
||||
|
||||
act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloInPlace"), _("Solo in-place"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloViaBus"), _("Solo via bus"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
|
@ -435,21 +431,16 @@ ARDOUR_UI::install_actions ()
|
|||
act = ActionManager::register_action (option_actions, X_("UnmuteNewFullCrossfades"), _("Unmute new full crossfades"), mem_fun (*this, &ARDOUR_UI::toggle_UnmuteNewFullCrossfades));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
|
||||
#ifdef NEW_ACTIONS
|
||||
act = ActionManager::register_action (option_actions, X_("SetRegionLayerMode", _("SetRegionLayerMode"), mem_fun (*this, &ARDOUR_UI::toggle_SetRegionLayerMode)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (option_actions, X_("SetCrossfadeModel", _("SetCrossfadeModel"), mem_fun (*this, &ARDOUR_UI::toggle_SetCrossfadeModel)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
#endif
|
||||
|
||||
ActionManager::add_action_group (shuttle_actions);
|
||||
ActionManager::add_action_group (option_actions);
|
||||
ActionManager::add_action_group (jack_actions);
|
||||
ActionManager::add_action_group (transport_actions);
|
||||
ActionManager::add_action_group (main_actions);
|
||||
ActionManager::add_action_group (common_actions);
|
||||
|
||||
/* initialize state of non-session dependent options */
|
||||
|
||||
setup_config_options ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -34,6 +34,31 @@ using namespace Gtk;
|
|||
using namespace Gtkmm2ext;
|
||||
using namespace ARDOUR;
|
||||
|
||||
void
|
||||
ARDOUR_UI::setup_config_options ()
|
||||
{
|
||||
struct {
|
||||
char* name;
|
||||
bool (Configuration::*method)(void) const;
|
||||
} options[] = {
|
||||
{ "ToggleTimeMaster", &Configuration::get_jack_time_master },
|
||||
{ "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport },
|
||||
{ "LatchedRecordEnable", &Configuration::get_latched_record_enable },
|
||||
{ "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture },
|
||||
{ "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun },
|
||||
{ "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
for (uint32_t n = 0; options[n].name; ++n) {
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action ("options", options[n].name);
|
||||
if (act) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
tact->set_active ((Config->*(options[n].method))());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_time_master ()
|
||||
{
|
||||
|
@ -370,7 +395,7 @@ ARDOUR_UI::mtc_port_changed ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::setup_options ()
|
||||
ARDOUR_UI::setup_session_options ()
|
||||
{
|
||||
mtc_port_changed ();
|
||||
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 1999 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <sigc++/bind.h>
|
||||
#include <pbd/error.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "keyboard_target.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
||||
void
|
||||
ARDOUR_UI::install_keybindings ()
|
||||
{
|
||||
}
|
|
@ -133,7 +133,7 @@ main (int argc, char* argv[])
|
|||
other_uimanager->insert_action_group (copy_actions (shared_actions));
|
||||
|
||||
other_window.add_accel_group (accels);
|
||||
window.add_accel_group (accels);
|
||||
// window.add_accel_group (accels);
|
||||
|
||||
Gtk::MenuBar* m;
|
||||
|
||||
|
|
|
@ -117,8 +117,6 @@ TapeAudioRegionView::~TapeAudioRegionView()
|
|||
void
|
||||
TapeAudioRegionView::update (uint32_t n)
|
||||
{
|
||||
cerr << "new peaks ready for channel " << n << endl;
|
||||
|
||||
/* check that all waves are build and ready */
|
||||
|
||||
if (!tmp_waves.empty()) {
|
||||
|
|
|
@ -625,7 +625,7 @@ Route::process_output_buffers (vector<Sample*>& bufs, uint32_t nbufs,
|
|||
if (_session.transport_speed() > 1.5f || _session.transport_speed() < -1.5f) {
|
||||
pan (bufs, nbufs, nframes, offset, speed_quietning);
|
||||
} else {
|
||||
// cerr << "panner state = " << _panner->automation_state() << endl;
|
||||
// cerr << _name << " panner state = " << _panner->automation_state() << endl;
|
||||
if (!_panner->empty() &&
|
||||
(_panner->automation_state() & Play ||
|
||||
((_panner->automation_state() & Touch) && !_panner->touching()))) {
|
||||
|
|
|
@ -155,6 +155,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
|
|||
_solo_model = InverseMute;
|
||||
solo_update_disabled = false;
|
||||
currently_soloing = false;
|
||||
_have_captured = false;
|
||||
_worst_output_latency = 0;
|
||||
_worst_input_latency = 0;
|
||||
_worst_track_latency = 0;
|
||||
|
@ -183,7 +184,6 @@ Session::first_stage_init (string fullpath, string snapshot_name)
|
|||
_master_out = 0;
|
||||
input_auto_connect = AutoConnectOption (0);
|
||||
output_auto_connect = AutoConnectOption (0);
|
||||
_have_captured = false;
|
||||
waiting_to_start = false;
|
||||
_exporting = false;
|
||||
_gain_automation_buffer = 0;
|
||||
|
@ -1023,6 +1023,12 @@ Session::load_options (const XMLNode& node)
|
|||
}
|
||||
}
|
||||
|
||||
if ((child = find_named_node (node, "end-marker-is-free")) != 0) {
|
||||
if ((prop = child->property ("val")) != 0) {
|
||||
_end_location_is_free = (prop->value() == "yes");
|
||||
}
|
||||
}
|
||||
|
||||
if ((child = find_named_node (node, "layer-model")) != 0) {
|
||||
if ((prop = child->property ("val")) != 0) {
|
||||
if (prop->value() == X_("LaterHigher")) {
|
||||
|
@ -1208,6 +1214,8 @@ Session::get_options () const
|
|||
child->add_property ("val", get_crossfades_active () ? "yes" : "no");
|
||||
child = opthead->add_child ("audible-click");
|
||||
child->add_property ("val", get_clicking () ? "yes" : "no");
|
||||
child = opthead->add_child ("end-marker-is-free");
|
||||
child->add_property ("val", _end_location_is_free ? "yes" : "no");
|
||||
|
||||
if (click_sound.length()) {
|
||||
child = opthead->add_child ("click-sound");
|
||||
|
|
|
@ -165,22 +165,11 @@ Session::realtime_stop (bool abort)
|
|||
decrement_transport_position (_worst_output_latency);
|
||||
#endif
|
||||
|
||||
if (_transport_frame > current_end_frame()) {
|
||||
|
||||
/* first capture resets end location; later captures can only extend the length */
|
||||
/* the duration change is not guaranteed to have happened, but is likely */
|
||||
|
||||
if (_end_location_is_free) {
|
||||
end_location->set_end (_transport_frame);
|
||||
_end_location_is_free = false;
|
||||
} else if (_transport_frame > end_location->start()) {
|
||||
end_location->set_end (_transport_frame);
|
||||
}
|
||||
|
||||
post_transport_work = PostTransportWork (post_transport_work | PostTransportDuration);
|
||||
}
|
||||
post_transport_work = PostTransportWork (post_transport_work | PostTransportDuration);
|
||||
}
|
||||
|
||||
|
||||
if (abort) {
|
||||
post_transport_work = PostTransportWork (post_transport_work | PostTransportAbort);
|
||||
}
|
||||
|
@ -307,21 +296,34 @@ Session::non_realtime_stop (bool abort)
|
|||
|
||||
if (did_record) {
|
||||
begin_reversible_command ("capture");
|
||||
|
||||
|
||||
Location* loc = _locations.end_location();
|
||||
bool change_end = false;
|
||||
|
||||
if (loc && !_have_captured) {
|
||||
|
||||
/* first capture.
|
||||
|
||||
note: later captures that extend the session length get
|
||||
handled because of playlist length changes.
|
||||
*/
|
||||
if (_transport_frame < loc->end()) {
|
||||
|
||||
/* stopped recording before current end */
|
||||
|
||||
if (_end_location_is_free) {
|
||||
|
||||
/* first capture for this session, move end back to where we are */
|
||||
|
||||
change_end = true;
|
||||
}
|
||||
|
||||
} else if (_transport_frame > loc->end()) {
|
||||
|
||||
add_undo (sigc::retype_return<void>(sigc::bind (mem_fun (*loc, &Location::set_end), loc->end())));
|
||||
add_redo (sigc::retype_return<void>(sigc::bind (mem_fun (*loc, &Location::set_end), _transport_frame)));
|
||||
/* stopped recording after the current end, extend it */
|
||||
|
||||
change_end = true;
|
||||
}
|
||||
|
||||
if (change_end) {
|
||||
add_undo (sigc::retype_return<void>(sigc::bind (mem_fun (*loc, &Location::set_end), loc->end())));
|
||||
add_redo (sigc::retype_return<void>(sigc::bind (mem_fun (*loc, &Location::set_end), _transport_frame)));
|
||||
}
|
||||
|
||||
_end_location_is_free = false;
|
||||
_have_captured = true;
|
||||
}
|
||||
|
||||
|
@ -718,6 +720,10 @@ Session::set_transport_speed (float speed, bool abort)
|
|||
|
||||
} else if (transport_stopped() && speed == 1.0) {
|
||||
|
||||
if (Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config->get_use_hardware_monitoring()) {
|
||||
/* Even though this is called from RT context we are using
|
||||
a non-tentative rwlock here, because the action must occur.
|
||||
|
@ -740,6 +746,10 @@ Session::set_transport_speed (float speed, bool abort)
|
|||
|
||||
} else {
|
||||
|
||||
if (Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) {
|
||||
warning << _("Global varispeed cannot be supported while Ardour is connected to JACK transport control")
|
||||
<< endmsg;
|
||||
|
|
Loading…
Reference in New Issue
Block a user