def read(self, frames, raw=False):
        channels, _ = _split(self.channels)
        dtype, _ = _split(self.dtype)
        data = ffi.new("signed char[]", channels * dtype.itemsize * frames)
        self._handle_error(_pa.Pa_ReadStream(self._stream, data, frames))
        if not raw:
            data = np.frombuffer(ffi.buffer(data), dtype=dtype)
            data.shape = frames, channels
        return data
Read samples from an input stream.
dataset/ETHPy150Open bastibe/PySoundCard/pysoundcard.py/InputStream.read