13
0

Add LatencyRange comparator, and explicit assignment operator

This commit is contained in:
Robin Gareus 2020-06-05 20:37:09 +02:00
parent ab9f51d2d8
commit 8f82ccd3aa
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 12 additions and 1 deletions

View File

@ -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 {

View File

@ -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;