mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
Add convenience methods to set port latencies
This commit is contained in:
parent
da467cf39b
commit
f149fd2653
2 changed files with 23 additions and 0 deletions
|
|
@ -120,6 +120,9 @@ public:
|
|||
samplecnt_t public_latency () const;
|
||||
samplecnt_t connected_latency (bool for_playback) const;
|
||||
|
||||
void set_private_port_latencies (samplecnt_t value, bool playback);
|
||||
void set_public_port_latencies (samplecnt_t value, bool playback) const;
|
||||
|
||||
PortSet& ports() { return _ports; }
|
||||
const PortSet& ports() const { return _ports; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1204,6 +1204,26 @@ IO::apply_pretty_name ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
IO::set_private_port_latencies (samplecnt_t value, bool playback)
|
||||
{
|
||||
LatencyRange lat;
|
||||
lat.min = lat.max = value;
|
||||
for (PortSet::iterator i = _ports.begin (); i != _ports.end(); ++i) {
|
||||
i->set_private_latency_range (lat, playback);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
IO::set_public_port_latencies (samplecnt_t value, bool playback) const
|
||||
{
|
||||
LatencyRange lat;
|
||||
lat.min = lat.max = value;
|
||||
for (PortSet::const_iterator i = _ports.begin (); i != _ports.end(); ++i) {
|
||||
i->set_public_latency_range (lat, playback);
|
||||
}
|
||||
}
|
||||
|
||||
samplecnt_t
|
||||
IO::latency () const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue