adds device to VirtualBus class explicitly

if basic kind.

patch bump
This commit is contained in:
onyx-and-iris 2023-09-06 15:53:57 +01:00
parent ab23280e70
commit b4306d9af5
2 changed files with 10 additions and 4 deletions

View File

@ -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 <code@onyxandiris.online>"]
license = "MIT"

View File

@ -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(