def is_stopped(self): """ Returns whether the stream is stopped. :rtype: bool """ return pa.is_stream_stopped(self._stream)
def close(self): if self._stream is not None: try: if not pa.is_stream_stopped(self._stream): pa.stop_stream(self._stream) finally: pa.close(self._stream) self._stream = None