Update list_audio_devices tool with new id algo

This commit is contained in:
Mashintime 2023-11-15 16:34:20 -05:00
parent 0916ef4ce7
commit 6e78b4d37c
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ def list_audio_devices():
print(str(device["native_index"]) + "\t" + device["id"] + " \t " + device["name"].strip().ljust(50) + device["api"])
def device_crc(device) -> str:
crc_hwid = crc_algorithm(bytes(f"{device}", encoding="utf-8"))
crc_hwid = crc_algorithm(bytes(f"{device['name']}.{device['hostapi']}", encoding="utf-8"))
crc_hwid = crc_hwid.to_bytes(2, byteorder="big")
crc_hwid = crc_hwid.hex()
return crc_hwid