add entry/exit functions to readme.

rethrow LoginError exceptions, let the consumer handle it.
This commit is contained in:
onyx-and-iris 2022-12-17 20:10:53 +00:00
parent 3b4185c251
commit ff4391c6fb
4 changed files with 18 additions and 4 deletions

View File

@ -30,6 +30,7 @@ v3 introduces some breaking changes. They are as follows:
- meta functions refactored, they now use identifier() functions. - meta functions refactored, they now use identifier() functions.
- OBS example reworked, now using obs-powershell module. - OBS example reworked, now using obs-powershell module.
- Rethrow LoginError for unknown kind exceptions, let the consumer handle it from there.
### Added ### Added
@ -46,7 +47,7 @@ v3 introduces some breaking changes. They are as follows:
### Removed ### Removed
- Bus[i].mode\_{param} parameters removed. Replaced with Bus[i].mode. - Bus[i].mode\_{param} members removed. Replaced with Bus[i].mode.{param}
## [2.5.0] - 2022-10-27 ## [2.5.0] - 2022-10-27

View File

@ -79,6 +79,19 @@ Voicemeeter factory function can be:
- Get-RemoteBanana - Get-RemoteBanana
- Get-RemotePotato - Get-RemotePotato
Added in v3 you may also use the following entry/exit points:
- Connect-Voicemeeter
- Disconnect-Voicemeeter
`Connect-Voicemeeter` takes a single parameter `Kind`.
for example:
```powershell
$vmr = Connect-Voicemeeter -Kind "potato"
```
#### `Through the Shell` #### `Through the Shell`
One liners should be run through a subshell, you may pipe the Remote object to a script block, for example: One liners should be run through a subshell, you may pipe the Remote object to a script block, for example:
@ -173,7 +186,7 @@ The following strip.gate commands are available:
for example: for example:
```powershell ```powershell
$vmr.strip[3].gate.knob = 3.3 $vmr.strip[3].gate.threshold = -40.5
``` ```
#### denoiser #### denoiser

View File

@ -105,7 +105,7 @@ Function Connect-Voicemeeter {
} }
catch [LoginError] { catch [LoginError] {
Write-Warning $_.Exception.ErrorMessage() Write-Warning $_.Exception.ErrorMessage()
Exit throw
} }
} }

View File

@ -45,7 +45,7 @@ function Login {
} }
catch [LoginError], [CAPIError] { catch [LoginError], [CAPIError] {
Write-Warning $_.Exception.ErrorMessage() Write-Warning $_.Exception.ErrorMessage()
exit throw
} }
while (P_Dirty -or M_Dirty) { Start-Sleep -m 1 } while (P_Dirty -or M_Dirty) { Start-Sleep -m 1 }