mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
Mackie Control, fix timecode sometimes won't update. Do full display if transport moves faster than 800%.
This commit is contained in:
parent
14ef6017f6
commit
0103de801a
2 changed files with 9 additions and 0 deletions
|
|
@ -106,6 +106,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
|
||||||
: ControlProtocol (session, X_("Mackie"))
|
: ControlProtocol (session, X_("Mackie"))
|
||||||
, AbstractUI<MackieControlUIRequest> ("mackie")
|
, AbstractUI<MackieControlUIRequest> ("mackie")
|
||||||
, _current_initial_bank (0)
|
, _current_initial_bank (0)
|
||||||
|
, _frame_last (0)
|
||||||
, _timecode_type (ARDOUR::AnyTime::BBT)
|
, _timecode_type (ARDOUR::AnyTime::BBT)
|
||||||
, _gui (0)
|
, _gui (0)
|
||||||
, _scrub_mode (false)
|
, _scrub_mode (false)
|
||||||
|
|
@ -1143,6 +1144,13 @@ MackieControlProtocol::update_timecode_display()
|
||||||
// do assignment here so current_frame is fixed
|
// do assignment here so current_frame is fixed
|
||||||
framepos_t current_frame = session->transport_frame();
|
framepos_t current_frame = session->transport_frame();
|
||||||
string timecode;
|
string timecode;
|
||||||
|
// For large jumps in play head possition do full reset
|
||||||
|
int moved = (current_frame - _frame_last) / session->frame_rate ();
|
||||||
|
if (moved) {
|
||||||
|
DEBUG_TRACE (DEBUG::MackieControl, "Timecode reset\n");
|
||||||
|
_timecode_last = string (10, ' ');
|
||||||
|
}
|
||||||
|
_frame_last = current_frame;
|
||||||
|
|
||||||
switch (_timecode_type) {
|
switch (_timecode_type) {
|
||||||
case ARDOUR::AnyTime::BBT:
|
case ARDOUR::AnyTime::BBT:
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,7 @@ class MackieControlProtocol
|
||||||
Mackie::Timer _frm_left_last;
|
Mackie::Timer _frm_left_last;
|
||||||
// last written timecode string
|
// last written timecode string
|
||||||
std::string _timecode_last;
|
std::string _timecode_last;
|
||||||
|
framepos_t _frame_last;
|
||||||
// Which timecode are we displaying? BBT or Timecode
|
// Which timecode are we displaying? BBT or Timecode
|
||||||
ARDOUR::AnyTime::Type _timecode_type;
|
ARDOUR::AnyTime::Type _timecode_type;
|
||||||
// Bundle to represent our input ports
|
// Bundle to represent our input ports
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue