From 3c0e0b150d50090c1b0704935badb094560d0317 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 8 Nov 2022 09:08:44 +0100 Subject: [PATCH] added hostapi name to audio device --- tnc/audio.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tnc/audio.py b/tnc/audio.py index 41190bb6..fc89a9d3 100644 --- a/tnc/audio.py +++ b/tnc/audio.py @@ -52,7 +52,10 @@ def device_crc(device) -> str: crc_hwid = crc_algorithm(bytes(f"{device}", encoding="utf-8")) crc_hwid = crc_hwid.to_bytes(2, byteorder="big") crc_hwid = crc_hwid.hex() - return f"{device['name']} [{crc_hwid}]" + + hostapi_name = sd.query_hostapis(device['hostapi'])['name'] + + return f"{device['name']} [{hostapi_name}] [{crc_hwid}]" def fetch_audio_devices(input_devices, output_devices):