diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-13 20:29:28 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-13 20:29:28 +0000 |
commit | e1581242ca8554660ea68290688e573a9acfca06 (patch) | |
tree | 49099b7fa12f4c0732dcc635fda59e448c1e5ea3 /gtk2_ardour/session_option_editor.cc | |
parent | f761de0d70b896c4a3437f99b238effac520519d (diff) |
implement TC offset for slave&generator.
Many related changes that require atomic update, mostly
because ClockOption slots changed:
* change offset config format to std:string (backwards compat - reads 0)
* make Timecode offset independent from fps
* sample_to_timecode() handle negative sample-num
* audio-clock fix entry and edit of negative numbers
* option editor:
- remove old global internal offset
- add slave & generator TC entry
- still needs UI cleanup, tooltops, maybe sep. tab..
* LTC & MTC slave& generator:
- cache offset
- subscribe to parameter changes
git-svn-id: svn://localhost/ardour2/branches/3.0@13485 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/session_option_editor.cc')
-rw-r--r-- | gtk2_ardour/session_option_editor.cc | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc index dd95b7f057..64ccc93de6 100644 --- a/gtk2_ardour/session_option_editor.cc +++ b/gtk2_ardour/session_option_editor.cc @@ -91,24 +91,32 @@ SessionOptionEditor::SessionOptionEditor (Session* s) add_option (_("Timecode"), _vpu); - ClockOption* co = new ClockOption ( - "timecode-offset", - _("Timecode offset"), - sigc::mem_fun (*_session_config, &SessionConfiguration::get_timecode_offset), - sigc::mem_fun (*_session_config, &SessionConfiguration::set_timecode_offset) + + add_option (_("Timecode"), new OptionEditorHeading (_("Ext Timecode Offsets"))); + + ClockOption* sco = new ClockOption ( + "slave-timecode-offset", + _("Slave Timecode offset"), + sigc::mem_fun (*_session_config, &SessionConfiguration::get_slave_timecode_offset), + sigc::mem_fun (*_session_config, &SessionConfiguration::set_slave_timecode_offset) ); - co->set_session (_session); - co->clock().set_negative_allowed (true); + sco->set_session (_session); + sco->clock().set_negative_allowed (true); - add_option (_("Timecode"), co); + add_option (_("Timecode"), sco); - add_option (_("Timecode"), new BoolOption ( - "timecode-offset-negative", - _("Timecode Offset Negative"), - sigc::mem_fun (*_session_config, &SessionConfiguration::get_timecode_offset_negative), - sigc::mem_fun (*_session_config, &SessionConfiguration::set_timecode_offset_negative) - )); + ClockOption* gco = new ClockOption ( + "timecode-generator-offset", + _("Timecode Generator offset"), + sigc::mem_fun (*_session_config, &SessionConfiguration::get_timecode_generator_offset), + sigc::mem_fun (*_session_config, &SessionConfiguration::set_timecode_generator_offset) + ); + + gco->set_session (_session); + gco->clock().set_negative_allowed (true); + + add_option (_("Timecode"), gco); add_option (_("Timecode"), new OptionEditorHeading (_("JACK Transport/Time Settings"))); @@ -300,7 +308,11 @@ SessionOptionEditor::parameter_changed (std::string const & p) _vpu->set_sensitive(true); } } - + if (p == "timecode-format") { + /* update offset clocks */ + parameter_changed("timecode-generator-offset"); + parameter_changed("slave-timecode-offset"); + } } /* the presence of absence of a monitor section is not really a regular session |