(self)
return self.filter.send(frames)
Fill buffer with frames and pre-process.
Fill buffer with frames and pre-process.
Fill buffer with frames and pre - process .
def _fill_buffer(self):
        """Fill buffer with frames and pre-process."""
        frame_buf = []
        frames = self.wav.read(self.buf_len*self.nchannels*self.sampwidth)
        if not frames:
            raise EndOfTape
        # convert MSBs to int (data stored little endian)
        # note that we simply throw away all the less significant bytes
        frames = (ord(_c) for _c in iterchar(frames[self.sampwidth-1::self.sampwidth]))
        # sum frames over channels
        frames = map(sum, zip(*[iter(frames)]*self.nchannels))
        frames = [
            _x-self.subtractor if _x >= self.sub_threshold else _x
            for _x in frames
        ]
        return self.filter.send(frames)
def _fill_buffer ( self ) : frame_buf = [ ] frames = self . wav . read ( self . buf_len * self . nchannels * self . sampwidth ) if not frames : raise EndOfTape # convert MSBs to int (data stored little endian) # note that we simply throw away all the less significant bytes frames = ( ord ( _c ) for _c in iterchar ( frames [ self . sampwidth - 1 : : self . sampwidth ] ) ) # sum frames over channels frames = map ( sum , zip ( * [ iter ( frames ) ] * self . nchannels ) ) frames = [ _x - self . subtractor if _x >= self . sub_threshold else _x for _x in frames ] return self . filter . send ( frames )