mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
option implemented
This commit is contained in:
parent
099ef38fad
commit
f03a44044d
64
lib/voicemeeter/option.rb
Normal file
64
lib/voicemeeter/option.rb
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
require_relative "iremote"
|
||||||
|
|
||||||
|
module Voicemeeter
|
||||||
|
module Option
|
||||||
|
class Option < IRemote
|
||||||
|
attr_reader :delay, :buffer, :mode
|
||||||
|
|
||||||
|
def initialize(remote)
|
||||||
|
super
|
||||||
|
make_accessor_int :sr
|
||||||
|
make_accessor_bool :asiosr, :monitoronsel, :slidermode
|
||||||
|
|
||||||
|
@delay = (0...remote.kind.phys_out).map { |i| OptionDelay(remote, i) }
|
||||||
|
@buffer = OptionBuffer.new(remote)
|
||||||
|
@mode = OptionMode.new(remote)
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
:option
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class OptionDelay < IRemote
|
||||||
|
def initialize(remote, i)
|
||||||
|
super
|
||||||
|
make_accessor_bool :on, :ab
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
"option.delay"
|
||||||
|
end
|
||||||
|
|
||||||
|
def get
|
||||||
|
getter("[#{i}]").to_i
|
||||||
|
end
|
||||||
|
|
||||||
|
def set(val)
|
||||||
|
setter("[#{i}]", val)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class OptionBuffer < IRemote
|
||||||
|
def initialize(remote)
|
||||||
|
super
|
||||||
|
make_accessor_int :mme, :wdm, :ks, :asio
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
"option.buffer"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class OptionMode < IRemote
|
||||||
|
def initialize(remote)
|
||||||
|
super
|
||||||
|
make_accessor_bool :exclusif, :swift
|
||||||
|
end
|
||||||
|
|
||||||
|
def identifier
|
||||||
|
"option.mode"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -9,6 +9,7 @@ require_relative "command"
|
|||||||
require_relative "recorder"
|
require_relative "recorder"
|
||||||
require_relative "device"
|
require_relative "device"
|
||||||
require_relative "fx"
|
require_relative "fx"
|
||||||
|
require_relative "option"
|
||||||
require_relative "configs"
|
require_relative "configs"
|
||||||
|
|
||||||
module Voicemeeter
|
module Voicemeeter
|
||||||
@ -26,6 +27,7 @@ module Voicemeeter
|
|||||||
@recorder = Recorder::Recorder.new(self)
|
@recorder = Recorder::Recorder.new(self)
|
||||||
@device = Device.new(self)
|
@device = Device.new(self)
|
||||||
@fx = Fx.new(self)
|
@fx = Fx.new(self)
|
||||||
|
@option = Option::Option.new(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
def configs
|
def configs
|
||||||
@ -42,15 +44,15 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
class RemoteBasic < Remote
|
class RemoteBasic < Remote
|
||||||
attr_reader :strip, :bus, :button, :vban, :command, :device
|
attr_reader :strip, :bus, :button, :vban, :command, :device, :option
|
||||||
end
|
end
|
||||||
|
|
||||||
class RemoteBanana < Remote
|
class RemoteBanana < Remote
|
||||||
attr_reader :strip, :bus, :button, :vban, :command, :device, :recorder
|
attr_reader :strip, :bus, :button, :vban, :command, :device, :option, :recorder
|
||||||
end
|
end
|
||||||
|
|
||||||
class RemotePotato < Remote
|
class RemotePotato < Remote
|
||||||
attr_reader :strip, :bus, :button, :vban, :command, :device, :recorder, :fx
|
attr_reader :strip, :bus, :button, :vban, :command, :device, :option, :recorder, :fx
|
||||||
end
|
end
|
||||||
|
|
||||||
public
|
public
|
||||||
|
Loading…
Reference in New Issue
Block a user