mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
entry/exit functions added
This commit is contained in:
parent
a40e36998c
commit
fc290ba90c
@ -88,4 +88,30 @@ Function Get-RemotePotato {
|
|||||||
return [Remote]::new('potato')
|
return [Remote]::new('potato')
|
||||||
}
|
}
|
||||||
|
|
||||||
Export-ModuleMember -Function Get-RemoteBasic, Get-RemoteBanana, Get-RemotePotato
|
Function Connect-Voicemeeter {
|
||||||
|
param([String]$Kind)
|
||||||
|
try {
|
||||||
|
switch ($Kind) {
|
||||||
|
"basic" {
|
||||||
|
return Get-RemoteBasic
|
||||||
|
}
|
||||||
|
"banana" {
|
||||||
|
return Get-RemoteBanana
|
||||||
|
}
|
||||||
|
"potato" {
|
||||||
|
return Get-RemotePotato
|
||||||
|
}
|
||||||
|
default { throw [LoginError]::new('Unknown Voicemeeter kind') }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch [LoginError] {
|
||||||
|
Write-Warning $_.Exception.ErrorMessage()
|
||||||
|
Exit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Function Disconnect-Voicemeeter {
|
||||||
|
Logout
|
||||||
|
}
|
||||||
|
|
||||||
|
Export-ModuleMember -Function Get-RemoteBasic, Get-RemoteBanana, Get-RemotePotato, Connect-Voicemeeter, Disconnect-Voicemeeter
|
||||||
|
Loading…
Reference in New Issue
Block a user