diff options
| author | Matthias Geier <Matthias.Geier@gmail.com> | 2017-08-19 17:09:35 +0200 |
|---|---|---|
| committer | Matthias Geier <Matthias.Geier@gmail.com> | 2017-08-19 17:09:35 +0200 |
| commit | 8370db2cf4ff08a23119824f2cecd08ad15a1165 (patch) | |
| tree | 7a984e6f824280431f7d9e226718da942112182c | |
| parent | abf1f19839059453436738d8d2979d22772c101c (diff) | |
Add .closed property
| -rw-r--r-- | sounddevice.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sounddevice.py b/sounddevice.py index 1f515f7..4152aa8 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -1181,6 +1181,11 @@ class _StreamBase(object): return _check(_lib.Pa_IsStreamStopped(self._ptr)) == 1 @property + def closed(self): + """``True`` after a call to `close()`, ``False`` otherwise.""" + return self._ptr == _ffi.NULL + + @property def time(self): """The current stream time in seconds. |
