mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 15:00:46 +00:00
use numbered parameters when building class arrays
This commit is contained in:
parent
fefcbe6661
commit
1e694b21aa
@ -10,7 +10,7 @@ module Voicemeeter
|
|||||||
make_accessor_int :sr
|
make_accessor_int :sr
|
||||||
make_accessor_bool :asiosr, :monitoronsel, :slidermode
|
make_accessor_bool :asiosr, :monitoronsel, :slidermode
|
||||||
|
|
||||||
@delay = (0...remote.kind.phys_out).map { |i| OptionDelay.new(remote, i) }
|
@delay = (0...remote.kind.phys_out).map { OptionDelay.new(remote, _1) }
|
||||||
@buffer = OptionBuffer.new(remote)
|
@buffer = OptionBuffer.new(remote)
|
||||||
@mode = OptionMode.new(remote)
|
@mode = OptionMode.new(remote)
|
||||||
end
|
end
|
||||||
|
@ -10,13 +10,13 @@ module Voicemeeter
|
|||||||
make_accessor_bool :postfadercomposite, :postfxinsert
|
make_accessor_bool :postfadercomposite, :postfxinsert
|
||||||
|
|
||||||
asio_in, asio_out = remote.kind.asio
|
asio_in, asio_out = remote.kind.asio
|
||||||
@asio = (0...asio_in).map { |i| PatchAsioIn.new(remote, i) }
|
@asio = (0...asio_in).map { PatchAsioIn.new(remote, _1) }
|
||||||
@outa2 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
@outa2 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||||
@outa3 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
@outa3 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||||
@outa4 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
@outa4 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||||
@outa5 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
@outa5 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||||
@composite = (0...8).map { |i| PatchComposite.new(remote, i) }
|
@composite = (0...8).map { PatchComposite.new(remote, _1) }
|
||||||
@insert = (0...remote.kind.insert).map { |i| PatchInsert.new(remote, i) }
|
@insert = (0...remote.kind.insert).map { PatchInsert.new(remote, _1) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ module Voicemeeter
|
|||||||
make_accessor_float :gain
|
make_accessor_float :gain
|
||||||
|
|
||||||
@mode = RecorderMode.new(remote)
|
@mode = RecorderMode.new(remote)
|
||||||
@armstrip = (0...remote.kind.num_strip).map { |j| RecorderArmStrip.new(remote, j) }
|
@armstrip = (0...remote.kind.num_strip).map { RecorderArmStrip.new(remote, _1) }
|
||||||
@armbus = (0...remote.kind.num_bus).map { |j| RecorderArmBus.new(remote, j) }
|
@armbus = (0...remote.kind.num_bus).map { RecorderArmBus.new(remote, _1) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def identifier
|
def identifier
|
||||||
|
@ -19,9 +19,9 @@ module Voicemeeter
|
|||||||
|
|
||||||
def steps
|
def steps
|
||||||
{
|
{
|
||||||
strip: -> { (0...kind.num_strip).map { |i| Strip::Strip.make(self, i) } },
|
strip: -> { (0...kind.num_strip).map { Strip::Strip.make(self, _1) } },
|
||||||
bus: -> { (0...kind.num_bus).map { |i| Bus::Bus.make(self, i) } },
|
bus: -> { (0...kind.num_bus).map { Bus::Bus.make(self, _1) } },
|
||||||
button: -> { (0...kind.num_buttons).map { |i| Button::Button.new(self, i) } },
|
button: -> { (0...kind.num_buttons).map { Button::Button.new(self, _1) } },
|
||||||
vban: -> { Vban::Vban.new(self) },
|
vban: -> { Vban::Vban.new(self) },
|
||||||
command: -> { Command.new(self) },
|
command: -> { Command.new(self) },
|
||||||
recorder: -> { Recorder::Recorder.new(self) },
|
recorder: -> { Recorder::Recorder.new(self) },
|
||||||
|
@ -22,7 +22,7 @@ module Voicemeeter
|
|||||||
make_accessor_int :limit
|
make_accessor_int :limit
|
||||||
make_accessor_string :label
|
make_accessor_string :label
|
||||||
|
|
||||||
@gainlayer = (0...8).map { |j| GainLayer.new(remote, i, j) }
|
@gainlayer = (0...8).map { GainLayer.new(remote, i, _1) }
|
||||||
@levels = StripLevels.new(remote, i)
|
@levels = StripLevels.new(remote, i)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ module Voicemeeter
|
|||||||
|
|
||||||
def initialize(remote)
|
def initialize(remote)
|
||||||
vban_in, vban_out = remote.kind.vban
|
vban_in, vban_out = remote.kind.vban
|
||||||
@instream = (0...vban_in).map { |i| VbanInstream.new(remote, i) }
|
@instream = (0...vban_in).map { VbanInstream.new(remote, _1) }
|
||||||
@outstream = (0...vban_out).map { |i| VbanOutstream.new(remote, i) }
|
@outstream = (0...vban_out).map { VbanOutstream.new(remote, _1) }
|
||||||
|
|
||||||
@remote = remote
|
@remote = remote
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user