def init(self, args): Intercom_bitplanes.init(self, args) #Init missed packets to 32 #DEFINIMOS VALOR INICIAL DE BUFFER DE CONTROL (CUENTA PAQUETES LLEGADO) self.missed_packets_rec=32 self.missed_packets_own=32 self.missed_last=32 self.missed_current=32 #self.recorded_chunk_number=0 #initializar BUFFER DE CONTROL CONO TODO EN 32 #si ES = TODOS PAQUETES DE CHUNK SI ES 32 NINGUNA HA LLEGADO #Init Control buffer with 32 missed packets in each position self._buffer_control=np.full(self.chunks_to_buffer*2,32,dtype=np.uint8) #ANIADIMOS UN CAMPO A PAQUETES DE ENVIO (VALOR DE CONGESTION) #Add "B" number of missed packets to struct format self.packet_format = f"!HBB{self.frames_per_chunk//8}B" if self.number_of_channels == 2: self.record_send_and_play = self.record_send_and_play_stereo
def init(self, args): Intercom_bitplanes.init(self, args) #Initialize missed packets to 32 on stereo (16 if mono) #We define the initial value of the control buffer (count the packets that have arrived) self.missed_packets_rec = 16 * self.number_of_channels self.missed_packets_own = 16 * self.number_of_channels self.missed_current = 16 * self.number_of_channels self.packages_to_sent = 16 * self.number_of_channels #(32=we await 32 packets) #Initialize Control buffer with 32 on stereo (16 if mono) missed packets in each position. #If it is 32 means that no package has arrived #If it is 0 means that all packages have arrived self._buffer_control = np.full([self.chunks_to_buffer * 2, 2], 16 * self.number_of_channels, dtype=np.uint8) #Add "B" number of packets to send(awaited packages) #Add "B" number of missed packets to struct format (congestion value) self.packet_format = f"!HBBB{self.frames_per_chunk//8}B" if self.number_of_channels == 2: self.record_send_and_play = self.record_send_and_play_stereo
def init(self, args): Intercom_bitplanes.init(self, args) if self.number_of_channels == 2: self.record_send_and_play = self.record_send_and_play_stereo
def init(self, args): Intercom_bitplanes.init(self, args)
def init(self, args): Intercom_bitplanes.init(self, args) if self.number_of_channels == 2: self.record_send_and_play = self.record_send_and_play_stereo print("Intercom_binaural: removing binaural redundancy ...")