diff --git a/helpers/device_manager.py b/helpers/device_manager.py index 578535a..7cdb576 100644 --- a/helpers/device_manager.py +++ b/helpers/device_manager.py @@ -31,18 +31,18 @@ class DeviceManager: host_apis = sd.query_hostapis() devices: sd.DeviceList = cls._getAudioDevices() - valid_host_apis = [] for host_api_id in range(len(host_apis)): if isWindows() and host_apis[host_api_id]["name"] not in WINDOWS_APIS: - continue + host_apis[host_api_id]["usable"] = False + else: + host_apis[host_api_id]["usable"] = True host_api_devices = (device for device in devices if device["hostapi"] == host_api_id) outputs: List[Dict] = list(filter(cls._isOutput, host_api_devices)) outputs = sorted(outputs, key=lambda k: k["name"]) - valid_host_apis.append(host_apis[host_api_id]) - valid_host_apis[-1]["output_devices"] = outputs + host_apis[host_api_id]["output_devices"] = outputs return host_apis diff --git a/templates/config.html b/templates/config.html index b5b4eec..ba1babb 100644 --- a/templates/config.html +++ b/templates/config.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content_inner %}
Please note: Currently BAPSicle does not support choosing which Host API is used. This list is for reference.
+Please note: Currently BAPSicle does not support choosing which Host API is used. Only supported options can be selected.
{% for host_api in data.outputs %}
{% for output in host_api.output_devices %}
+ {% if host_api.usable %}
Set for:
{% for channel in data.channels %}
Channel {{channel.channel}}
{% endfor %}
- - {% if output.name %}{{output.name}}{% else %}System Default Output{% endif %}
+ -
+ {% endif %}{% if output.name %}{{output.name}}{% else %}System Default Output{% endif %}
{% endfor %}
{% endfor %}