diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index c7618158a0..6cabde195a 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -749,8 +749,19 @@ enum MidiPortFlags { }; struct LatencyRange { + LatencyRange () : min (0), max (0) {} + uint32_t min; //< samples uint32_t max; //< samples + + bool operator==(const LatencyRange& other) { + return (min == other.min && max == other.max); + } + + void operator=(const LatencyRange& other) { + min = other.min; + max = other.max; + } }; enum BufferingPreset { diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index c08abe95f5..e26fd206aa 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -409,7 +409,7 @@ Session::send_full_time_code (samplepos_t const t, MIDI::pframes_t nframes) outbound_mtc_timecode_frame = mtc_tc; transmitting_timecode_time = timecode; - LatencyRange mtc_out_latency = {0, 0}; // TODO cache this, update on engine().GraphReordered() + LatencyRange mtc_out_latency; _midi_ports->mtc_output_port ()->get_connected_latency_range (ltc_out_latency, true); sampleoffset_t mtc_offset = mtc_out_latency.max;