From b978f5aa3f611c7442f16559e7d37c1568be65a6 Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Thu, 6 Aug 2026 19:40:54 -0400 Subject: [PATCH] RunVoicemeeter, RunApplication --- lib/Voicemeeter.psm1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/Voicemeeter.psm1 b/lib/Voicemeeter.psm1 index d132c4e..3165c0d 100644 --- a/lib/Voicemeeter.psm1 +++ b/lib/Voicemeeter.psm1 @@ -40,6 +40,15 @@ class Remote { Logout } + [Remote] RunVoicemeeter([String]$kindId) { + RunVm -kindId $kindId + return Make_Remote -kindId $kindId + } + + [void] RunApplication([String]$appId) { + RunApp -appId $appId + } + [string] GetType() { return VmType } @@ -159,6 +168,26 @@ class RemotePotato : Remote { } } +function Make_Remote { + param( + [String]$kindId + ) + switch ($kindId) { + 'basic' { + [RemoteBasic]::new() + } + 'banana' { + [RemoteBanana]::new() + } + 'potato' { + [RemotePotato]::new() + } + default { + throw [VMRemoteError]::new("Unknown Voicemeeter kind `"$kindId`"") + } + } +} + Function Get-RemoteBasic { [RemoteBasic]::new().Login() }