move the external sync source selection tobe a global config parameter, not per-session, since this is likely a reflection of studio setup, h/w etc.; starting using real tooltips in the RC option editor
git-svn-id: svn://localhost/ardour2/branches/3.0@13237 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1a53055019
commit
9707a0e827
@ -1601,7 +1601,7 @@ ARDOUR_UI::transport_roll ()
|
||||
|
||||
#if 0
|
||||
if (_session->config.get_external_sync()) {
|
||||
switch (_session->config.get_sync_source()) {
|
||||
switch (Config->get_sync_source()) {
|
||||
case JACK:
|
||||
break;
|
||||
default:
|
||||
@ -1648,7 +1648,7 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
|
||||
}
|
||||
|
||||
if (_session->config.get_external_sync()) {
|
||||
switch (_session->config.get_sync_source()) {
|
||||
switch (Config->get_sync_source()) {
|
||||
case JACK:
|
||||
break;
|
||||
default:
|
||||
|
@ -60,7 +60,7 @@ ARDOUR_UI::toggle_external_sync()
|
||||
{
|
||||
if (_session) {
|
||||
if (_session->config.get_video_pullup() != 0.0f) {
|
||||
if (_session->config.get_sync_source() == JACK) {
|
||||
if (Config->get_sync_source() == JACK) {
|
||||
MessageDialog msg (
|
||||
_("It is not possible to use JACK as the the sync source\n\
|
||||
when the pull up/down setting is non-zero."));
|
||||
@ -311,7 +311,7 @@ ARDOUR_UI::parameter_changed (std::string p)
|
||||
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
|
||||
} else {
|
||||
sync_button.set_text (sync_source_to_string (_session->config.get_sync_source(), true));
|
||||
sync_button.set_text (sync_source_to_string (Config->get_sync_source(), true));
|
||||
/* XXX need to make auto-play is off as well as insensitive */
|
||||
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
|
||||
@ -439,7 +439,7 @@ ARDOUR_UI::synchronize_sync_source_and_video_pullup ()
|
||||
act->set_sensitive (true);
|
||||
} else {
|
||||
/* can't sync to JACK if video pullup != 0.0 */
|
||||
if (_session->config.get_sync_source() == JACK) {
|
||||
if (Config->get_sync_source() == JACK) {
|
||||
act->set_sensitive (false);
|
||||
} else {
|
||||
act->set_sensitive (true);
|
||||
|
@ -1083,7 +1083,7 @@ AudioClock::set_timecode (framepos_t when, bool /*force*/)
|
||||
if (_left_layout) {
|
||||
|
||||
if (_session->config.get_external_sync()) {
|
||||
switch (_session->config.get_sync_source()) {
|
||||
switch (Config->get_sync_source()) {
|
||||
case JACK:
|
||||
_left_layout->set_text ("JACK");
|
||||
break;
|
||||
|
@ -2106,7 +2106,7 @@ Editor::transition_to_rolling (bool fwd)
|
||||
}
|
||||
|
||||
if (_session->config.get_external_sync()) {
|
||||
switch (_session->config.get_sync_source()) {
|
||||
switch (Config->get_sync_source()) {
|
||||
case JACK:
|
||||
break;
|
||||
default:
|
||||
|
@ -1019,24 +1019,45 @@ RCOptionEditor::RCOptionEditor ()
|
||||
|
||||
BoolOption* tsf = new BoolOption (
|
||||
"timecode-sync-frame-rate",
|
||||
_("Force Ardour's timecode rate to match an external timecode source"),
|
||||
_("Match session video frame rate to external timecode (when slaved to timecode)"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_sync_frame_rate),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_sync_frame_rate)
|
||||
);
|
||||
tsf->set_note (_("If off, slaving to timecode will cause Ardour to chase the external timecode\nsource but it will use its own timecode frame rate"));
|
||||
Gtkmm2ext::UI::instance()->set_tip
|
||||
(tsf->tip_widget(),
|
||||
_("This option controls the value of the video frame rate <i>while chasing</i> an external timecode source.\n\n"
|
||||
"When enabled, the session video frame rate will be changed to match that of the selected external timecode source.\n\n"
|
||||
"When not enabled, the session video frame rate will not be changed to match that of the selected external timecode source."
|
||||
"Instead the frame rate indication in the main clock will flash red and Ardour will convert between the external "
|
||||
"timecode standard and the session standard"));
|
||||
|
||||
add_option (_("Transport"), tsf);
|
||||
|
||||
tsf = new BoolOption (
|
||||
"timecode-source-is-synced",
|
||||
_("Timecode source shares sample clock with audio interface"),
|
||||
_("External timecode is sync locked"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_source_is_synced),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_source_is_synced)
|
||||
);
|
||||
Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
|
||||
_("If on, Ardour will assume that the timecode source shares an external sync\nsource (Blackburst, Word Clock, etc.) with your audio interface."
|
||||
"\nThis is a preferable configuration but may not match your equipment"));
|
||||
Gtkmm2ext::UI::instance()->set_tip
|
||||
(tsf->tip_widget(),
|
||||
_("When enabled, indicates that the selected external timecode source shares sync (Black & Burst, Wordclock, etc) with the audio interface"));
|
||||
|
||||
add_option (_("Transport"), tsf);
|
||||
|
||||
_sync_source = new ComboOption<SyncSource> (
|
||||
"sync-source",
|
||||
_("External timecode source"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_sync_source),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_source)
|
||||
);
|
||||
|
||||
populate_sync_options ();
|
||||
parameter_changed (string ("external-sync"));
|
||||
|
||||
add_option (_("Timecode"), _sync_source);
|
||||
|
||||
|
||||
/* EDITOR */
|
||||
|
||||
add_option (_("Editor"),
|
||||
@ -1674,5 +1695,23 @@ RCOptionEditor::parameter_changed (string const & p)
|
||||
}
|
||||
_solo_control_is_listen_control->set_sensitive (s);
|
||||
_listen_position->set_sensitive (s);
|
||||
} else if (p == "external-sync") {
|
||||
if (_session) {
|
||||
_sync_source->set_sensitive (!_session->config.get_external_sync ());
|
||||
} else {
|
||||
_sync_source->set_sensitive (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RCOptionEditor::populate_sync_options ()
|
||||
{
|
||||
vector<SyncSource> sync_opts = ARDOUR::get_available_sync_options ();
|
||||
|
||||
_sync_source->clear ();
|
||||
|
||||
for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) {
|
||||
_sync_source->add (*i, sync_source_to_string (*i));
|
||||
}
|
||||
}
|
||||
|
@ -34,10 +34,13 @@ class RCOptionEditor : public OptionEditor
|
||||
public:
|
||||
RCOptionEditor ();
|
||||
|
||||
void populate_sync_options ();
|
||||
|
||||
private:
|
||||
void parameter_changed (std::string const &);
|
||||
ARDOUR::RCConfiguration* _rc_config;
|
||||
BoolOption* _solo_control_is_listen_control;
|
||||
ComboOption<ARDOUR::ListenPosition>* _listen_position;
|
||||
VisibilityGroup _mixer_strip_visibility;
|
||||
ComboOption<ARDOUR::SyncSource>* _sync_source;
|
||||
};
|
||||
|
@ -37,18 +37,6 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||
|
||||
/* TIMECODE*/
|
||||
|
||||
_sync_source = new ComboOption<SyncSource> (
|
||||
"sync-source",
|
||||
_("External timecode source"),
|
||||
sigc::mem_fun (*_session_config, &SessionConfiguration::get_sync_source),
|
||||
sigc::mem_fun (*_session_config, &SessionConfiguration::set_sync_source)
|
||||
);
|
||||
|
||||
populate_sync_options ();
|
||||
parameter_changed (string ("external-sync"));
|
||||
|
||||
add_option (_("Timecode"), _sync_source);
|
||||
|
||||
add_option (_("Timecode"), new OptionEditorHeading (_("Timecode Settings")));
|
||||
|
||||
ComboOption<TimecodeFormat>* smf = new ComboOption<TimecodeFormat> (
|
||||
@ -299,26 +287,10 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||
));
|
||||
}
|
||||
|
||||
void
|
||||
SessionOptionEditor::populate_sync_options ()
|
||||
{
|
||||
vector<SyncSource> sync_opts = _session->get_available_sync_options ();
|
||||
|
||||
_sync_source->clear ();
|
||||
|
||||
for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) {
|
||||
_sync_source->add (*i, sync_source_to_string (*i));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SessionOptionEditor::parameter_changed (std::string const & p)
|
||||
{
|
||||
OptionEditor::parameter_changed (p);
|
||||
|
||||
if (p == "external-sync") {
|
||||
_sync_source->set_sensitive (!_session->config.get_external_sync ());
|
||||
}
|
||||
}
|
||||
|
||||
/* the presence of absence of a monitor section is not really a regular session
|
||||
|
@ -31,10 +31,8 @@ public:
|
||||
|
||||
private:
|
||||
void parameter_changed (std::string const &);
|
||||
void populate_sync_options ();
|
||||
|
||||
ARDOUR::SessionConfiguration* _session_config;
|
||||
ComboOption<ARDOUR::SyncSource>* _sync_source;
|
||||
|
||||
bool set_use_monitor_section (bool);
|
||||
bool get_use_monitor_section ();
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
@ -68,6 +69,7 @@ namespace ARDOUR {
|
||||
}
|
||||
|
||||
void setup_fpu ();
|
||||
std::vector<SyncSource> get_available_sync_options();
|
||||
}
|
||||
|
||||
#endif /* __ardour_ardour_h__ */
|
||||
|
@ -43,10 +43,14 @@ CONFIG_VARIABLE (bool, midi_feedback, "midi-feedback", false)
|
||||
CONFIG_VARIABLE (int32_t, mmc_receive_device_id, "mmc-receive-device-id", 0x7f)
|
||||
CONFIG_VARIABLE (int32_t, mmc_send_device_id, "mmc-send-device-id", 0)
|
||||
CONFIG_VARIABLE (int32_t, initial_program_change, "initial-program-change", -1)
|
||||
CONFIG_VARIABLE (bool, first_midi_bank_is_zero, "diplay-first-midi-bank-as-zero", false)
|
||||
|
||||
/* Timecode and related */
|
||||
|
||||
CONFIG_VARIABLE (int, mtc_qf_speed_tolerance, "mtc-qf-speed-tolerance", 5)
|
||||
CONFIG_VARIABLE (bool, timecode_sync_frame_rate, "timecode-sync-frame-rate", true)
|
||||
CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true)
|
||||
CONFIG_VARIABLE (bool, first_midi_bank_is_zero, "diplay-first-midi-bank-as-zero", false)
|
||||
CONFIG_VARIABLE (SyncSource, sync_source, "sync-source", JACK)
|
||||
|
||||
/* control surfaces */
|
||||
|
||||
|
@ -503,9 +503,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||
static PBD::Signal1<void, framepos_t> StartTimeChanged;
|
||||
static PBD::Signal1<void, framepos_t> EndTimeChanged;
|
||||
|
||||
std::vector<SyncSource> get_available_sync_options() const;
|
||||
void request_sync_source (Slave*);
|
||||
bool synced_to_jack() const { return config.get_external_sync() && config.get_sync_source() == JACK; }
|
||||
bool synced_to_jack() const { return config.get_external_sync() && Config->get_sync_source() == JACK; }
|
||||
|
||||
double transport_speed() const { return _transport_speed; }
|
||||
bool transport_stopped() const { return _transport_speed == 0.0f; }
|
||||
|
@ -52,7 +52,6 @@ CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
|
||||
CONFIG_VARIABLE (bool, show_summary, "show-summary", true)
|
||||
CONFIG_VARIABLE (bool, show_group_tabs, "show-group-tabs", true)
|
||||
CONFIG_VARIABLE (bool, external_sync, "external-sync", false)
|
||||
CONFIG_VARIABLE (SyncSource, sync_source, "sync-source", JACK)
|
||||
CONFIG_VARIABLE (InsertMergePolicy, insert_merge_policy, "insert-merge-policy", InsertMergeRelax)
|
||||
CONFIG_VARIABLE (framecnt_t, timecode_offset, "timecode-offset", 0)
|
||||
CONFIG_VARIABLE (bool, timecode_offset_negative, "timecode-offset-negative", true)
|
||||
|
@ -476,3 +476,15 @@ ARDOUR::translations_are_disabled ()
|
||||
/* if file does not exist, we don't translate (bundled ardour only) */
|
||||
return Glib::file_test (translation_kill_path(), Glib::FILE_TEST_EXISTS) == false;
|
||||
}
|
||||
|
||||
vector<SyncSource>
|
||||
ARDOUR::get_available_sync_options ()
|
||||
{
|
||||
vector<SyncSource> ret;
|
||||
|
||||
ret.push_back (JACK);
|
||||
ret.push_back (MTC);
|
||||
ret.push_back (MIDIClock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -4189,18 +4189,6 @@ Session::route_removed_from_route_group (RouteGroup* rg, boost::weak_ptr<Route>
|
||||
RouteRemovedFromRouteGroup (rg, r);
|
||||
}
|
||||
|
||||
vector<SyncSource>
|
||||
Session::get_available_sync_options () const
|
||||
{
|
||||
vector<SyncSource> ret;
|
||||
|
||||
ret.push_back (JACK);
|
||||
ret.push_back (MTC);
|
||||
ret.push_back (MIDIClock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
boost::shared_ptr<RouteList>
|
||||
Session::get_routes_with_regions_at (framepos_t const p) const
|
||||
{
|
||||
|
@ -3500,7 +3500,7 @@ Session::config_changed (std::string p, bool ours)
|
||||
if (!config.get_external_sync()) {
|
||||
drop_sync_source ();
|
||||
} else {
|
||||
switch_to_sync_source (config.get_sync_source());
|
||||
switch_to_sync_source (Config->get_sync_source());
|
||||
}
|
||||
} else if (p == "denormal-model") {
|
||||
setup_fpu ();
|
||||
|
Loading…
Reference in New Issue
Block a user