diff options
| author | Matthias Geier <Matthias.Geier@gmail.com> | 2022-05-05 21:58:51 +0200 |
|---|---|---|
| committer | Matthias Geier <Matthias.Geier@gmail.com> | 2022-05-05 22:25:25 +0200 |
| commit | 6c9e9f20217d29af45c39cf300337791e2a2fe35 (patch) | |
| tree | b613b706bd76375989b5e47359b590939de2478b | |
| parent | b7962d7c8be1a7d39280c84fc8d394571e698dd0 (diff) | |
Add "index" field to device dict
| -rw-r--r-- | sounddevice.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sounddevice.py b/sounddevice.py index 1600148..862aaa0 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -476,6 +476,8 @@ def query_devices(device=None, kind=None): ``'name'`` The name of the device. + ``'index'`` + The device index. ``'hostapi'`` The ID of the corresponding host API. Use `query_hostapis()` to get information about a host API. @@ -580,6 +582,7 @@ def query_devices(device=None, kind=None): raise device_dict = { 'name': name, + 'index': device, 'hostapi': info.hostApi, 'max_input_channels': info.maxInputChannels, 'max_output_channels': info.maxOutputChannels, |
