mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
identifier, kindOfEq
- move identifier back to BusEq and StripEq for clarity and looser coupling - adjust kindmap so we can get channel count with kindOfEq
This commit is contained in:
parent
d13b08eff4
commit
8038fc24ce
@ -84,7 +84,11 @@ class BusMode : IRemote {
|
||||
}
|
||||
|
||||
class BusEq : Eq {
|
||||
BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus', $remote.kind.bus_ch) {
|
||||
BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus') {
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
return 'Bus[' + $this.index + '].EQ'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
16
lib/eq.ps1
16
lib/eq.ps1
@ -1,29 +1,25 @@
|
||||
class Eq : IRemote {
|
||||
[System.Collections.ArrayList]$channel
|
||||
[string]$prefix
|
||||
[string]$kindOfEq
|
||||
|
||||
Eq ([int]$index, [Object]$remote, [string]$prefix, [int]$chCount) : base ($index, $remote) {
|
||||
$this.prefix = $prefix
|
||||
Eq ([int]$index, [Object]$remote, [string]$kindOfEq) : base ($index, $remote) {
|
||||
$this.kindOfEq = $kindOfEq
|
||||
|
||||
AddBoolMembers -PARAMS @('on', 'ab')
|
||||
|
||||
$this.channel = @()
|
||||
for ($ch = 0; $ch -lt $chCount; $ch++) {
|
||||
for ($ch = 0; $ch -lt $remote.kind.eq_ch[$this.kindOfEq]; $ch++) {
|
||||
$this.channel.Add([EqChannel]::new($ch, $remote, $this.identifier()))
|
||||
}
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
return '{0}[{1}].EQ' -f $this.prefix, $this.index
|
||||
}
|
||||
|
||||
[void] Load ([string]$filename) {
|
||||
$param = 'Command.Load{0}Eq[{1}]' -f $this.prefix, $this.index
|
||||
$param = 'Command.Load{0}Eq[{1}]' -f $this.kindOfEq, $this.index
|
||||
$this.remote.Setter($param, $filename)
|
||||
}
|
||||
|
||||
[void] Save ([string]$filename) {
|
||||
$param = 'Command.Save{0}Eq[{1}]' -f $this.prefix, $this.index
|
||||
$param = 'Command.Save{0}Eq[{1}]' -f $this.kindOfEq, $this.index
|
||||
$this.remote.Setter($param, $filename)
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +153,11 @@ class StripDenoiser : IRemote {
|
||||
}
|
||||
|
||||
class StripEq : Eq {
|
||||
StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip', $remote.kind.strip_ch) {
|
||||
StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip') {
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
return 'Strip[' + $this.index + '].EQ'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user