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_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)
|
||||
@mode = OptionMode.new(remote)
|
||||
end
|
||||
|
@ -10,13 +10,13 @@ module Voicemeeter
|
||||
make_accessor_bool :postfadercomposite, :postfxinsert
|
||||
|
||||
asio_in, asio_out = remote.kind.asio
|
||||
@asio = (0...asio_in).map { |i| PatchAsioIn.new(remote, i) }
|
||||
@outa2 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
||||
@outa3 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
||||
@outa4 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
||||
@outa5 = (0...asio_out).map { |i| PatchAsioOut.new(remote, i) }
|
||||
@composite = (0...8).map { |i| PatchComposite.new(remote, i) }
|
||||
@insert = (0...remote.kind.insert).map { |i| PatchInsert.new(remote, i) }
|
||||
@asio = (0...asio_in).map { PatchAsioIn.new(remote, _1) }
|
||||
@outa2 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||
@outa3 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||
@outa4 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||
@outa5 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
||||
@composite = (0...8).map { PatchComposite.new(remote, _1) }
|
||||
@insert = (0...remote.kind.insert).map { PatchInsert.new(remote, _1) }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,8 +26,8 @@ module Voicemeeter
|
||||
make_accessor_float :gain
|
||||
|
||||
@mode = RecorderMode.new(remote)
|
||||
@armstrip = (0...remote.kind.num_strip).map { |j| RecorderArmStrip.new(remote, j) }
|
||||
@armbus = (0...remote.kind.num_bus).map { |j| RecorderArmBus.new(remote, j) }
|
||||
@armstrip = (0...remote.kind.num_strip).map { RecorderArmStrip.new(remote, _1) }
|
||||
@armbus = (0...remote.kind.num_bus).map { RecorderArmBus.new(remote, _1) }
|
||||
end
|
||||
|
||||
def identifier
|
||||
|
@ -19,9 +19,9 @@ module Voicemeeter
|
||||
|
||||
def steps
|
||||
{
|
||||
strip: -> { (0...kind.num_strip).map { |i| Strip::Strip.make(self, i) } },
|
||||
bus: -> { (0...kind.num_bus).map { |i| Bus::Bus.make(self, i) } },
|
||||
button: -> { (0...kind.num_buttons).map { |i| Button::Button.new(self, i) } },
|
||||
strip: -> { (0...kind.num_strip).map { Strip::Strip.make(self, _1) } },
|
||||
bus: -> { (0...kind.num_bus).map { Bus::Bus.make(self, _1) } },
|
||||
button: -> { (0...kind.num_buttons).map { Button::Button.new(self, _1) } },
|
||||
vban: -> { Vban::Vban.new(self) },
|
||||
command: -> { Command.new(self) },
|
||||
recorder: -> { Recorder::Recorder.new(self) },
|
||||
|
@ -22,7 +22,7 @@ module Voicemeeter
|
||||
make_accessor_int :limit
|
||||
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)
|
||||
end
|
||||
|
||||
|
@ -48,8 +48,8 @@ module Voicemeeter
|
||||
|
||||
def initialize(remote)
|
||||
vban_in, vban_out = remote.kind.vban
|
||||
@instream = (0...vban_in).map { |i| VbanInstream.new(remote, i) }
|
||||
@outstream = (0...vban_out).map { |i| VbanOutstream.new(remote, i) }
|
||||
@instream = (0...vban_in).map { VbanInstream.new(remote, _1) }
|
||||
@outstream = (0...vban_out).map { VbanOutstream.new(remote, _1) }
|
||||
|
||||
@remote = remote
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user