We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c0070e + 986a117 commit 928ccb9Copy full SHA for 928ccb9
src/audio_codecs/audio_codec.py
@@ -88,7 +88,7 @@ def _auto_pick_device(self, kind: str) -> Optional[int]:
88
if "WASAPI" in name:
89
key = "default_input_device" if kind == "input" else "default_output_device"
90
cand = ha.get(key, -1)
91
- if isinstance(cand, int) and cand >= 0:
+ if isinstance(cand, int) and 0 <= cand < len(devices):
92
d = devices[cand]
93
if (kind == "input" and d["max_input_channels"] > 0) or (
94
kind == "output" and d["max_output_channels"] > 0
0 commit comments