diff --git a/src/auracast/server/multicast_server.py b/src/auracast/server/multicast_server.py index 5d2a1de..90976ed 100644 --- a/src/auracast/server/multicast_server.py +++ b/src/auracast/server/multicast_server.py @@ -198,7 +198,8 @@ class StreamerWorker: # TODO: is wraping in this Worker stricly nececcarry ? if big.audio_source.startswith('device:'): big.audio_source = f'device:{device_index}' devinfo = sd.query_devices(device_index) - capture_rate = int(devinfo.get('default_samplerate') or 48000) + # Force capture at 48 kHz to avoid resampler latency and 44.1 kHz incompatibilities + capture_rate = 48000 max_in = int(devinfo.get('max_input_channels') or 1) channels = max(1, min(2, max_in)) for big in conf.bigs: @@ -446,7 +447,7 @@ async def _autostart_from_settings(): ): return # Check against the cached device lists - usb = [d for _, d in get_usb_pw_inputs()] + usb = [d for _, d in get_alsa_usb_inputs()] net = [d for _, d in get_network_pw_inputs()] names = {d.get('name') for d in usb} | {d.get('name') for d in net} if input_device_name in names: