From 473e35359fb06e85e44f76becf7af8d06329c3b2 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Sat, 18 Jun 2022 11:12:09 +0100 Subject: [PATCH] minor changes minor changes --- vban_cmd/base.py | 3 +-- vban_cmd/config.py | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/vban_cmd/base.py b/vban_cmd/base.py index d7d95a4..7684783 100644 --- a/vban_cmd/base.py +++ b/vban_cmd/base.py @@ -43,8 +43,7 @@ class VbanCmd(metaclass=ABCMeta): self.expected_packet = VBAN_VMRT_Packet_Header() self.socks = tuple( - socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - for _, _ in enumerate(Socket) + socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for _ in Socket ) self.running = True self.subject = Subject() diff --git a/vban_cmd/config.py b/vban_cmd/config.py index 678c288..f27c746 100644 --- a/vban_cmd/config.py +++ b/vban_cmd/config.py @@ -11,9 +11,6 @@ class TOMLStrBuilder: def __init__(self, kind): self.kind = kind - self.phys_in, self.virt_in = kind.ins - self.phys_out, self.virt_out = kind.outs - self.higher = itertools.chain( [f"strip-{i}" for i in range(kind.num_strip)], [f"bus-{i}" for i in range(kind.num_bus)], @@ -27,8 +24,8 @@ class TOMLStrBuilder: "solo = false", "gain = 0.0", ] - + [f"A{i} = false" for i in range(1, self.phys_out + 1)] - + [f"B{i} = false" for i in range(1, self.virt_out + 1)] + + [f"A{i} = false" for i in range(1, self.kind.phys_out + 1)] + + [f"B{i} = false" for i in range(1, self.kind.virt_out + 1)] ) self.phys_strip_params = self.virt_strip_params + [ "comp = 0.0", @@ -61,7 +58,7 @@ class TOMLStrBuilder: case "strip": toml_str += ("\n").join( self.phys_strip_params - if int(index) < self.phys_in + if int(index) < self.kind.phys_in else self.virt_strip_params ) case "bus":