Unverified Commit bf5c4aff authored by Jakob Görgen's avatar Jakob Görgen
Browse files

symphony/orchestration: system allow to set latencies for all channels

parent 90e4b61a
...@@ -76,13 +76,17 @@ class System(util_base.IdObj): ...@@ -76,13 +76,17 @@ class System(util_base.IdObj):
for chan in channels: for chan in channels:
chan.set_latency(amount, ratio) chan.set_latency(amount, ratio)
def latencies(self, amount: int, ratio: util_base.Time, channel_type: tp.Any) -> None: def latencies(
relevant_channels = list( self, amount: int, ratio: util_base.Time, channel_type: tp.Any | None = None
filter( ) -> None:
lambda chan: util_base.check_type(chan, channel_type), relevant_channels = self._all_channels
self._all_channels.values(), if channel_type:
relevant_channels = list(
filter(
lambda chan: util_base.check_type(chan, channel_type),
self._all_channels.values(),
)
) )
)
System.set_latencies(relevant_channels, amount, ratio) System.set_latencies(relevant_channels, amount, ratio)
def toJSON(self) -> dict: def toJSON(self) -> dict:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment