minor changes

minor changes
This commit is contained in:
onyx-and-iris 2022-06-18 11:12:09 +01:00
parent c3062d9b13
commit 473e35359f
2 changed files with 4 additions and 8 deletions

View File

@ -43,8 +43,7 @@ class VbanCmd(metaclass=ABCMeta):
self.expected_packet = VBAN_VMRT_Packet_Header() self.expected_packet = VBAN_VMRT_Packet_Header()
self.socks = tuple( self.socks = tuple(
socket.socket(socket.AF_INET, socket.SOCK_DGRAM) socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for _ in Socket
for _, _ in enumerate(Socket)
) )
self.running = True self.running = True
self.subject = Subject() self.subject = Subject()

View File

@ -11,9 +11,6 @@ class TOMLStrBuilder:
def __init__(self, kind): def __init__(self, kind):
self.kind = kind self.kind = kind
self.phys_in, self.virt_in = kind.ins
self.phys_out, self.virt_out = kind.outs
self.higher = itertools.chain( self.higher = itertools.chain(
[f"strip-{i}" for i in range(kind.num_strip)], [f"strip-{i}" for i in range(kind.num_strip)],
[f"bus-{i}" for i in range(kind.num_bus)], [f"bus-{i}" for i in range(kind.num_bus)],
@ -27,8 +24,8 @@ class TOMLStrBuilder:
"solo = false", "solo = false",
"gain = 0.0", "gain = 0.0",
] ]
+ [f"A{i} = false" for i in range(1, self.phys_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.virt_out + 1)] + [f"B{i} = false" for i in range(1, self.kind.virt_out + 1)]
) )
self.phys_strip_params = self.virt_strip_params + [ self.phys_strip_params = self.virt_strip_params + [
"comp = 0.0", "comp = 0.0",
@ -61,7 +58,7 @@ class TOMLStrBuilder:
case "strip": case "strip":
toml_str += ("\n").join( toml_str += ("\n").join(
self.phys_strip_params self.phys_strip_params
if int(index) < self.phys_in if int(index) < self.kind.phys_in
else self.virt_strip_params else self.virt_strip_params
) )
case "bus": case "bus":