mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 01:40:49 +00:00
use A2-A5 for asio out patching
This commit is contained in:
parent
a93fa95712
commit
99293b1905
@ -3,7 +3,7 @@ require_relative "iremote"
|
|||||||
module Voicemeeter
|
module Voicemeeter
|
||||||
module Patch
|
module Patch
|
||||||
class Patch < IRemote
|
class Patch < IRemote
|
||||||
attr_reader :asio, :asioa2, :asioa3, :asioa4, :asioa5, :composite, :insert
|
attr_reader :asio, :A2, :A3, :A4, :A5, :composite, :insert
|
||||||
|
|
||||||
def initialize(remote)
|
def initialize(remote)
|
||||||
super
|
super
|
||||||
@ -11,10 +11,9 @@ module Voicemeeter
|
|||||||
|
|
||||||
asio_in, asio_out = remote.kind.asio
|
asio_in, asio_out = remote.kind.asio
|
||||||
@asio = (0...asio_in).map { PatchAsioIn.new(remote, _1) }
|
@asio = (0...asio_in).map { PatchAsioIn.new(remote, _1) }
|
||||||
@outa2 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
%i[A2 A3 A4 A5].each do |param|
|
||||||
@outa3 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
instance_variable_set("@#{param}", (0...asio_out).map { PatchAsioOut.new(remote, _1, param) })
|
||||||
@outa4 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
end
|
||||||
@outa5 = (0...asio_out).map { PatchAsioOut.new(remote, _1) }
|
|
||||||
@composite = (0...8).map { PatchComposite.new(remote, _1) }
|
@composite = (0...8).map { PatchComposite.new(remote, _1) }
|
||||||
@insert = (0...remote.kind.insert).map { PatchInsert.new(remote, _1) }
|
@insert = (0...remote.kind.insert).map { PatchInsert.new(remote, _1) }
|
||||||
end
|
end
|
||||||
@ -37,12 +36,17 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
class PatchAsioOut < PatchAsio
|
class PatchAsioOut < PatchAsio
|
||||||
|
def initialize(remote, i, param)
|
||||||
|
super(remote, i)
|
||||||
|
@param = param
|
||||||
|
end
|
||||||
|
|
||||||
def get
|
def get
|
||||||
getter("asio[#{@index}]").to_i
|
getter("out#{@param}[#{@index}]").to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def set(val)
|
def set(val)
|
||||||
setter("asio[#{@index}]", val)
|
setter("out#{@param}[#{@index}]", val)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user