vban-cmd-python/vbancmd/kinds.py
onyx-and-iris 6c2fb720f2 reformat long arrays
fix long multi line arrays created by black
2022-03-27 11:33:01 +01:00

31 lines
832 B
Python

import sys
import platform
from collections import namedtuple
from .errors import VMCMDErrors
"""
Represents a major version of Voicemeeter and describes
its strip layout.
"""
VMKind = namedtuple("VMKind", ["id", "name", "ins", "outs", "executable", "vban"])
bits = 64 if sys.maxsize > 2**32 else 32
os = platform.system()
# fmt: off
_kind_map = {
"basic": VMKind("basic", "Basic", (2, 1), (1, 1), "voicemeeter.exe", (4, 4)),
"banana": VMKind("banana", "Banana", (3, 2), (3, 2), "voicemeeterpro.exe", (8, 8)),
"potato": VMKind("potato", "Potato", (5, 3), (5, 3), f'voicemeeter8{"x64" if bits == 64 else ""}.exe', (8, 8),),
}
# fmt: on
def get(kind_id):
try:
return _kind_map[kind_id]
except KeyError:
raise VMCMDErrors(f"Invalid Voicemeeter kind: {kind_id}")
all = list(_kind_map.values())