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:
parent
e95d33502f
commit
2932337a32
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user