Skip to content

Commit 7cc6efb

Browse files
committed
remove mapping
1 parent 236fad1 commit 7cc6efb

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

livekit-rtc/livekit/rtc/media_devices.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -395,22 +395,15 @@ def _input_callback(
395395
except Exception:
396396
pass
397397

398-
# If a specific device channel is requested, map to that channel only.
399-
# sounddevice's channel mapping is 1-based (PortAudio convention).
400-
mapping = None
401-
channels_arg = self._channels
402-
if input_channel_index is not None:
403-
channels_arg = 1
404-
mapping = [int(input_channel_index) + 1]
405-
398+
# Note: input_channel_index is currently not used as sounddevice mapping
399+
# parameter is not supported in all versions.
406400
input_stream = sd.InputStream(
407401
callback=_input_callback,
408402
dtype="int16",
409-
channels=channels_arg,
403+
channels=self._channels,
410404
device=input_device,
411405
samplerate=self._in_sr,
412406
blocksize=self._blocksize,
413-
mapping=mapping,
414407
)
415408
input_stream.start()
416409

0 commit comments

Comments
 (0)