Skip to content

Commit 8370db2

Browse files
committed
Add .closed property
1 parent abf1f19 commit 8370db2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sounddevice.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,11 @@ def stopped(self):
11801180
"""
11811181
return _check(_lib.Pa_IsStreamStopped(self._ptr)) == 1
11821182

1183+
@property
1184+
def closed(self):
1185+
"""``True`` after a call to `close()`, ``False`` otherwise."""
1186+
return self._ptr == _ffi.NULL
1187+
11831188
@property
11841189
def time(self):
11851190
"""The current stream time in seconds.

0 commit comments

Comments
 (0)