Skip to content

Commit 32fdcda

Browse files
committed
play_file example: use wait() instead of blocking=True
1 parent 747030a commit 32fdcda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/play_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def int_or_str(text):
2929
import sounddevice as sd
3030
import soundfile as sf
3131
data, fs = sf.read(args.filename, dtype='float32')
32-
sd.play(data, fs, device=args.device, blocking=True)
33-
status = sd.get_status()
32+
sd.play(data, fs, device=args.device)
33+
status = sd.wait()
3434
if status:
3535
parser.exit('Error during playback: ' + str(status))
3636
except KeyboardInterrupt:

0 commit comments

Comments
 (0)