void
ARDOUR_UI::toggle_time_master ()
{
- ActionManager::toggle_config_state ("Transport", "ToggleTimeMaster", &RCConfiguration::set_jack_time_master, &RCConfiguration::get_jack_time_master);
+ ActionManager::toggle_config_state_foo ("Transport", "ToggleTimeMaster", mem_fun (session->config, &SessionConfiguration::set_jack_time_master), mem_fun (session->config, &SessionConfiguration::get_jack_time_master));
}
void
Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- Config->set_use_video_sync (tact->get_active());
+ session->config.set_use_video_sync (tact->get_active());
}
}
} else if (p == "clicking") {
ActionManager::map_some_state ("Transport", "ToggleClick", &RCConfiguration::get_clicking);
} else if (p == "jack-time-master") {
- ActionManager::map_some_state ("Transport", "ToggleTimeMaster", &RCConfiguration::get_jack_time_master);
+ ActionManager::map_some_state ("Transport", "ToggleTimeMaster", mem_fun (session->config, &SessionConfiguration::get_jack_time_master));
} else if (p == "plugins-stop-with-transport") {
ActionManager::map_some_state ("options", "StopPluginsWithTransport", &RCConfiguration::get_plugins_stop_with_transport);
} else if (p == "new-plugins-active") {
} else if (p == "remote-model") {
map_remote_model ();
} else if (p == "use-video-sync") {
- ActionManager::map_some_state ("Transport", "ToggleVideoSync", &RCConfiguration::get_use_video_sync);
+ ActionManager::map_some_state ("Transport", "ToggleVideoSync", mem_fun (session->config, &SessionConfiguration::get_use_video_sync));
} else if (p == "quieten-at-speed") {
ActionManager::map_some_state ("options", "GainReduceFastTransport", &RCConfiguration::get_quieten_at_speed);
} else if (p == "shuttle-behaviour") {
frames_upper_info_label->set_text (buf);
}
- float vid_pullup = Config->get_video_pullup();
+ float vid_pullup = session->config.get_video_pullup();
if (vid_pullup == 0.0) {
if (frames_lower_info_label->get_text () != _("none")) {
RefPtr<Action> act;
const char* action = 0;
- float pullup = Config->get_video_pullup();
+ float pullup = session->config.get_video_pullup();
if ( pullup < (-4.1667 - 0.1) * 0.99) {
action = X_("PullupMinus4Minus1");
if (act) {
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
if (ract && ract->get_active()) {
- Config->set_video_pullup ( pull );
+ session->config.set_video_pullup ( pull );
}
} else {
mem_fun (*_session_config, &SessionConfiguration::get_timecode_source_is_synced),
mem_fun (*_session_config, &SessionConfiguration::set_timecode_source_is_synced)
));
+
+ ComboOption<float>* vpu = new ComboOption<float> (
+ "video-pullup",
+ _("Pull-up / pull-down"),
+ mem_fun (*_session_config, &SessionConfiguration::get_video_pullup),
+ mem_fun (*_session_config, &SessionConfiguration::set_video_pullup)
+ );
+
+ vpu->add (4.1667 + 0.1, _("4.1667 + 0.1%"));
+ vpu->add (4.1667, _("4.1667"));
+ vpu->add (4.1667 - 0.1, _("4.1667 - 0.1%"));
+ vpu->add (0.1, _("0.1"));
+ vpu->add (0, _("none"));
+ vpu->add (-0.1, _("-0.1"));
+ vpu->add (-4.1667 + 0.1, _("-4.1667 + 0.1%"));
+ vpu->add (-4.1667, _("-4.1667"));
+ vpu->add (-4.1667 - 0.1, _("-4.1667 - 0.1%"));
+
+ add_option (_("Sync"), vpu);
/* MISC */
CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true)
CONFIG_VARIABLE (bool, locate_while_waiting_for_sync, "locate-while-waiting-for-sync", false)
-/* timecode and sync */
-
-CONFIG_VARIABLE (bool, jack_time_master, "jack-time-master", true)
-CONFIG_VARIABLE (bool, use_video_sync, "use-video-sync", false)
-CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
-
/* metering */
CONFIG_VARIABLE (float, meter_hold, "meter-hold", 100.0f)
CONFIG_VARIABLE (std::string, auditioner_output_left, "auditioner-output-left", "default")
CONFIG_VARIABLE (std::string, auditioner_output_right, "auditioner-output-right", "default")
CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true)
+CONFIG_VARIABLE (bool, jack_time_master, "jack-time-master", true)
+CONFIG_VARIABLE (bool, use_video_sync, "use-video-sync", false)
+CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
jack_set_sync_callback (_jack, _jack_sync_callback, this);
jack_set_freewheel_callback (_jack, _freewheel_callback, this);
- if (Config->get_jack_time_master()) {
+ if (session && session->config.get_jack_time_master()) {
jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
}
int
AudioEngine::reset_timebase ()
{
- if (_jack) {
- if (Config->get_jack_time_master()) {
+ if (_jack && session) {
+ if (session->config.get_jack_time_master()) {
return jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
} else {
return jack_release_timebase (_jack);
jack_set_sync_callback (_jack, _jack_sync_callback, this);
jack_set_freewheel_callback (_jack, _freewheel_callback, this);
- if (Config->get_jack_time_master()) {
+ if (session && session->config.get_jack_time_master()) {
jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
}
_engine.transport_stop ();
}
- if (Config->get_jack_time_master()) {
+ if (config.get_jack_time_master()) {
_engine.transport_locate (_transport_frame);
}
process_function = &Session::process_with_events;
- if (Config->get_use_video_sync()) {
+ if (config.get_use_video_sync()) {
waiting_for_sync_offset = true;
} else {
waiting_for_sync_offset = false;
} else if (p == "use-video-sync") {
- waiting_for_sync_offset = Config->get_use_video_sync();
+ waiting_for_sync_offset = config.get_use_video_sync();
} else if (p == "mmc-control") {
void
Session::sync_time_vars ()
{
- _current_frame_rate = (nframes_t) round (_base_frame_rate * (1.0 + (Config->get_video_pullup()/100.0)));
+ _current_frame_rate = (nframes_t) round (_base_frame_rate * (1.0 + (config.get_video_pullup()/100.0)));
_frames_per_smpte_frame = (double) _current_frame_rate / (double) smpte_frames_per_second();
if (smpte_drop_frames()) {
_frames_per_hour = (long)(107892 * _frames_per_smpte_frame);
target_phi = 0;
phase = 0;
- if (Config->get_use_video_sync()) {
+ if (config.get_use_video_sync()) {
waiting_for_sync_offset = true;
}