def get_pipe_channel(self, data, channel):
""" Retrieve data for particular channel """
ch = audioop.tomono(data, 2, channel[0], channel[1])
ch_max = audioop.max(ch, 2)
return int(self.max * (ch_max / self.k))
文章目录