mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-08-17 01:24:23 +00:00
RunVoicemeeter, RunApplication
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user