mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
MIDIClock is not a Timecode slave, fix segfault
git-svn-id: svn://localhost/ardour2/branches/3.0@13446 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6657159ba8
commit
4e1a813f4d
2 changed files with 14 additions and 2 deletions
|
|
@ -1077,8 +1077,9 @@ ARDOUR_UI::update_timecode_format ()
|
|||
if (_session) {
|
||||
bool matching;
|
||||
TimecodeSlave* tcslave;
|
||||
SyncSource sync_src = Config->get_sync_source();
|
||||
|
||||
if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
|
||||
if ((sync_src == LTC || sync_src == MTC) && (tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
|
||||
matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format());
|
||||
} else {
|
||||
matching = true;
|
||||
|
|
|
|||
|
|
@ -1028,9 +1028,20 @@ AudioClock::set_slave_info ()
|
|||
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
||||
_right_layout->set_text ("");
|
||||
break;
|
||||
case MIDIClock:
|
||||
if (slave) {
|
||||
_left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>",
|
||||
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
||||
_right_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>",
|
||||
INFO_FONT_SIZE, slave->approximate_current_delta()));
|
||||
} else {
|
||||
_left_layout->set_markup (string_compose ("<span size=\"%1\" foreground=\"white\">%2</span>",
|
||||
INFO_FONT_SIZE, _("--pending--")));
|
||||
_right_layout->set_text ("");
|
||||
}
|
||||
break;
|
||||
case LTC:
|
||||
case MTC:
|
||||
case MIDIClock:
|
||||
if (slave) {
|
||||
bool matching;
|
||||
TimecodeSlave* tcslave;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue