Add method to check for ambiguous port latency
This commit is contained in:
parent
6c6bea26ad
commit
597837022a
@ -109,6 +109,8 @@ class LIBARDOUR_API PortManager
|
||||
virtual void add_pending_port_deletion (Port*) = 0;
|
||||
PBD::RingBuffer<Port*>& port_deletions_pending () { return _port_deletions_pending; }
|
||||
|
||||
bool check_for_amibiguous_latency (bool log = false) const;
|
||||
|
||||
/* per-Port monitoring */
|
||||
|
||||
bool can_request_input_monitoring () const;
|
||||
|
@ -1374,3 +1374,27 @@ PortManager::set_port_buffer_sizes (pframes_t n)
|
||||
p->second->set_buffer_size (n);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
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 {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user