From f16b9487ba22624cad1552fbd85077069785cac2 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sun, 23 Sep 2018 20:44:08 +0200 Subject: [PATCH] play_long_file example: Change ctype -> dtype This was changed in https://github.com/bastibe/SoundFile/pull/179 and removed in https://github.com/bastibe/SoundFile/pull/200. --- examples/play_long_file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/play_long_file.py b/examples/play_long_file.py index cdc37d1..90e41c9 100755 --- a/examples/play_long_file.py +++ b/examples/play_long_file.py @@ -70,7 +70,7 @@ def callback(outdata, frames, time, status): with sf.SoundFile(args.filename) as f: for _ in range(args.buffersize): - data = f.buffer_read(args.blocksize, ctype='float') + data = f.buffer_read(args.blocksize, dtype='float32') if not data: break q.put_nowait(data) # Pre-fill queue @@ -82,7 +82,7 @@ def callback(outdata, frames, time, status): with stream: timeout = args.blocksize * args.buffersize / f.samplerate while data: - data = f.buffer_read(args.blocksize, ctype='float') + data = f.buffer_read(args.blocksize, dtype='float32') q.put(data, timeout=timeout) event.wait() # Wait until playback is finished except KeyboardInterrupt: