Improve TX/RX AGC

This commit is contained in:
2026-08-29 12:06:25 +02:00
parent 21b25d303e
commit 8b124751d5
2 changed files with 49 additions and 28 deletions
+3 -2
View File
@@ -15,9 +15,10 @@ class UdpClientProtocol(asyncio.DatagramProtocol):
self.future.set_result(data)
class VocoderEngine:
def __init__(self, mode="emulator", host="127.0.0.1"):
# Aggiungiamo port_start e port_end per decidere dinamicamente il range
def __init__(self, mode="emulator", host="127.0.0.1", port_start=2470, port_end=2479):
self.host = host
self.ports = list(range(2470, 2480))
self.ports = list(range(port_start, port_end + 1))
self.pool = {} # porta -> (transport, protocol, lock)
self.stream_alloc = {} # stream_id -> porta
self.last_seen = {} # stream_id -> timestamp ultimo pacchetto