File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,26 @@ def get_status():
587587 raise RuntimeError ('play()/rec()/playrec() was not called yet' )
588588
589589
590+ def get_stream ():
591+ """Get a reference to the current stream.
592+
593+ This applies only to streams created by calls to `play()`, `rec()`,
594+ or `playrec()`.
595+
596+ Returns
597+ -------
598+ Stream
599+ An `OutputStream`, `InputStream`, or `Stream` associated with
600+ the last invocation of `play()`, `rec()` or `playrec()`
601+ respectively.
602+
603+ """
604+ if _last_callback :
605+ return _last_callback .stream
606+ else :
607+ raise RuntimeError ('play()/rec()/playrec() was not called yet' )
608+
609+
590610def query_devices (device = None , kind = None ):
591611 """Return information about available devices.
592612
You can’t perform that action at this time.
0 commit comments