13
0

Fix ambiguous latency check

Only compare playback latency, delaylines in tracks do not
push back the capture latency to the source.
The delayline on tracks sits in between disk-writer and disk-reader,
delaying input to align with the disk-reader.

Furthermore tracks may be connected to different inputs,
even though those inputs are usually from the same hardware
device, capture latency of those ports can differ.
This commit is contained in:
Robin Gareus 2020-04-07 04:06:02 +02:00
parent e95d33502f
commit 2932337a32
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1380,19 +1380,19 @@ PortManager::check_for_amibiguous_latency (bool log) const
{
bool rv = false;
boost::shared_ptr<Ports> plist = ports.reader();
for (Ports::iterator p = plist->begin(); p != plist->end(); ++p) {
for (int c = 0; c < 1; ++c) {
LatencyRange range;
p->second->get_connected_latency_range (range, c ? true : false);
if (range.min != range.max) {
if (log) {
warning << string_compose(_("PortEngine: ambiguous %1 latency for port '%2' (%3, %4)"),
(c ? "playback" : "capture"), p->second->name(), range.min, range.max)
<< endmsg;
rv = true;
} else {
for (Ports::iterator pi = plist->begin(); pi != plist->end(); ++pi) {
boost::shared_ptr<Port> const& p (pi->second);
if (! p->sends_output ()) {
continue;
}
LatencyRange range;
p->get_connected_latency_range (range, true);
if (range.min != range.max) {
if (log) {
warning << string_compose(_("Ambiguous latency for port '%1' (%2, %3)"), p->name(), range.min, range.max) << endmsg;
rv = true;
} else {
return true;
}
}
}
}