ARDOUR_UI::toggle_session_auto_loop ()
{
if (session) {
- if (Config->get_auto_loop()) {
+ if (session->get_play_loop()) {
if (session->transport_rolling()) {
transport_roll();
} else {
void
ARDOUR_UI::toggle_GainReduceFastTransport()
{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "GainReduceFastTransport");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_quieten_at_speed (0.251189); // -12dB reduction for ffwd or rewind
- } else {
- Config->set_quieten_at_speed (1.0); /* no change */
- }
- }
+ ActionManager::toggle_config_state ("options", "GainReduceFastTransport", &Configuration::set_quieten_at_speed, &Configuration::get_quieten_at_speed);
}
void
void
ARDOUR_UI::map_meter_falloff ()
{
- const char* action = 0;
+ const char* action = X_("MeterFalloffMedium");
/* XXX hack alert. Fix this. Please */
float val = Config->get_meter_falloff ();
- MeterFalloff code = (MeterFalloff) (floor (val));
+ MeterFalloff code = (MeterFalloff) (int) (floor (val));
switch (code) {
case MeterFalloffOff:
void
ARDOUR_UI::map_meter_hold ()
{
- const char* action = 0;
+ const char* action = X_("MeterHoldMedium");
/* XXX hack alert. Fix this. Please */
float val = Config->get_meter_hold ();
- MeterHold code = (MeterHold) (floor (val));
+ MeterHold code = (MeterHold) (int) (floor (val));
switch (code) {
case MeterHoldOff:
void
ARDOUR_UI::parameter_changed (const char* parameter_name)
{
- cerr << "Parameter changed : " << parameter_name << endl;
-
#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
-
+
if (PARAM_IS ("slave-source")) {
sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
map_solo_model ();
} else if (PARAM_IS ("auto-play")) {
ActionManager::map_some_state ("Transport", "ToggleAutoPlay", &Configuration::get_auto_play);
- } else if (PARAM_IS ("auto-loop")) {
- ActionManager::map_some_state ("Transport", "Loop", &Configuration::get_auto_loop);
} else if (PARAM_IS ("auto-return")) {
ActionManager::map_some_state ("Transport", "ToggleAutoReturn", &Configuration::get_auto_return);
} else if (PARAM_IS ("auto-input")) {
map_meter_hold ();
} else if (PARAM_IS ("meter-falloff")) {
map_meter_falloff ();
+ } else if (PARAM_IS ("verify-remove-last-capture")) {
+ ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
+ } else if (PARAM_IS ("video-pullup") || PARAM_IS ("smpte-frames-per-second")) {
+ if (session) {
+ primary_clock.set (session->audible_frame(), true);
+ secondary_clock.set (session->audible_frame(), true);
+ } else {
+ primary_clock.set (0, true);
+ secondary_clock.set (0, true);
+ }
}
#undef PARAM_IS