diff options
| author | Matthias Geier <Matthias.Geier@gmail.com> | 2016-03-11 19:57:08 +0100 |
|---|---|---|
| committer | Matthias Geier <Matthias.Geier@gmail.com> | 2016-03-11 19:57:08 +0100 |
| commit | b5e50e073ba70128c89e68018a42cd4920552375 (patch) | |
| tree | e01f6f46168ddc6eb6738e6a61f78967955458ea /examples/spectrogram.py | |
| parent | 60d1ce317bf74ea79f2ddde8737a065d5f8d6fa2 (diff) | |
Allow device strings in query_devices() ...
... and allow to conveniently get information about the
default input/output device.
Diffstat (limited to 'examples/spectrogram.py')
| -rwxr-xr-x | examples/spectrogram.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/spectrogram.py b/examples/spectrogram.py index 06fa5ca..00f3c88 100755 --- a/examples/spectrogram.py +++ b/examples/spectrogram.py @@ -51,9 +51,7 @@ try: print(sd.query_devices()) parser.exit() - if args.device is None: - args.device = sd.default.device['input'] - samplerate = sd.query_devices(args.device)['default_samplerate'] + samplerate = sd.query_devices(args.device, 'input')['default_samplerate'] delta_f = (high - low) / (args.columns - 1) fftsize = np.ceil(samplerate / delta_f).astype(int) |
