mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
hide Convert, add mode.set
tests pass for all kinds
This commit is contained in:
11
lib/bus.ps1
11
lib/bus.ps1
@@ -36,7 +36,7 @@ class BusLevels : IRemote {
|
||||
$this.offset = 8
|
||||
}
|
||||
|
||||
[single] Convert([single]$val) {
|
||||
hidden [single] Convert([single]$val) {
|
||||
if ($val -gt 0) {
|
||||
return [math]::Round(20 * [math]::Log10($val), 1)
|
||||
}
|
||||
@@ -82,6 +82,15 @@ class BusMode : IRemote {
|
||||
}
|
||||
return $mode
|
||||
}
|
||||
|
||||
[void] Set ([string]$mode) {
|
||||
if ($this.modes.Contains($mode)) {
|
||||
$this.Setter($mode, $true)
|
||||
}
|
||||
else {
|
||||
throw [System.ArgumentException]::new("Invalid mode: $mode")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class BusEq : Eq {
|
||||
|
||||
Reference in New Issue
Block a user