use map to build vban instream/outstream

This commit is contained in:
onyx-and-iris 2023-07-14 15:00:20 +01:00
parent 4b311520d4
commit b047d6c706

View File

@ -48,10 +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 = [] @instream = (0...vban_in).map { |i| VbanInstream.new(remote, i) }
vban_in.times { |i| @instream << VbanInstream.new(remote, i) } @outstream = (0...vban_out).map { |i| VbanOutstream.new(remote, i) }
@outstream = []
vban_out.times { |i| @outstream << VbanOutstream.new(remote, i) }
@remote = remote @remote = remote
end end