From a483f83b4b9147fc8df1529ab5e27bff0de24221 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sat, 9 Apr 2022 02:36:48 -0400 Subject: [PATCH] //WIP V3 Bot Changes - Increased loop delay when waiting for GQRX to start Noisegate Change - Display whether the noisegate is active or not in the logs --- NoiseGatev2.py | 5 ++++- gqrxHandler.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NoiseGatev2.py b/NoiseGatev2.py index 96a8db0..cae6880 100644 --- a/NoiseGatev2.py +++ b/NoiseGatev2.py @@ -167,7 +167,10 @@ class NoiseGateStream(discord.AudioSource): buffer_decibel = 20 * math.log10(buffer_rms) if self.process_set_count % 10 == 0: - LOGGER.debug(f"{buffer_decibel} db") + if buffer_decibel >= self.stream.THRESHOLD: + LOGGER.debug(f"[Noisegate Open] {buffer_decibel} db") + else: + LOGGER.debug(f"[Noisegate Closed] {buffer_decibel} db") if buffer_decibel >= self.stream.THRESHOLD: self.NG_fadeout_count = self.NG_fadeout diff --git a/gqrxHandler.py b/gqrxHandler.py index 9a61980..57f99e7 100644 --- a/gqrxHandler.py +++ b/gqrxHandler.py @@ -124,7 +124,7 @@ class GQRXHandler(threading.Thread): while not self.tel_conn: self.create_telnet_connection() - sleep(.5) + sleep(2) self.logger.debug(f"Waiting for GQRX to start") self.GQRX_Started = True