diff --git a/hugvey/client.py b/hugvey/client.py index fb3ce96..87811fe 100644 --- a/hugvey/client.py +++ b/hugvey/client.py @@ -161,18 +161,9 @@ class VoiceServer(object): if self.hugvey.cmd_server.muteMic: logger.debug('block recording {}' .format( self.hugvey.cmd_server.muteMic)) - - # if recording is blocked, store the latest n frames. So we can release - # this buffer to the mic stream - self.prerol_frames.append(f) # multiply by 0 to disable audio recording while playback f = audioop.mul(f, 2, 0) - elif len(self.prerol_frames) > 0: - self.prerol_frames.append(f) - f = b''.join(self.prerol_frames) - self.prerol_frames.clear() - logger.info('used buffer, len now {}'.format(len(f))) self.loop.call_soon_threadsafe(self.voice_socket.send, f)