From b4306d9af562c33686a181ea55466ad5d229b19a Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 6 Sep 2023 15:53:57 +0100 Subject: [PATCH] adds device to VirtualBus class explicitly if basic kind. patch bump --- pyproject.toml | 2 +- voicemeeterlib/bus.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 73957c1..aef8d0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "voicemeeter-api" -version = "2.4.8" +version = "2.4.9" description = "A Python wrapper for the Voiceemeter API" authors = ["onyx-and-iris "] license = "MIT" diff --git a/voicemeeterlib/bus.py b/voicemeeterlib/bus.py index dd50653..672921b 100644 --- a/voicemeeterlib/bus.py +++ b/voicemeeterlib/bus.py @@ -173,7 +173,7 @@ class BusDevice(IRemote): class VirtualBus(Bus): @classmethod - def make(cls, kind): + def make(cls, remote, i, kind): """ Factory method for VirtualBus. @@ -183,7 +183,13 @@ class VirtualBus(Bus): """ kls = (cls,) if kind.name == "basic": - kls += (PhysicalBus,) + return type( + "VirtualBus", + kls, + { + "device": BusDevice.make(remote, i), + }, + ) elif kind.name == "potato": EFFECTS_cls = _make_effects_mixin() kls += (EFFECTS_cls,) @@ -306,7 +312,7 @@ def bus_factory(is_phys_bus, remote, i) -> Union[PhysicalBus, VirtualBus]: BUS_cls = ( PhysicalBus.make(remote, i, remote.kind) if is_phys_bus - else VirtualBus.make(remote.kind) + else VirtualBus.make(remote, i, remote.kind) ) BUSMODEMIXIN_cls = _make_bus_mode_mixin() return type(