2023-07-17 06:30:09 +01:00
|
|
|
require_relative "iremote"
|
|
|
|
|
|
|
|
module Voicemeeter
|
|
|
|
module Option
|
2023-07-27 10:58:26 +01:00
|
|
|
class Base
|
|
|
|
include IRemote
|
2023-07-17 06:30:09 +01:00
|
|
|
attr_reader :delay, :buffer, :mode
|
|
|
|
|
|
|
|
def initialize(remote)
|
|
|
|
super
|
|
|
|
make_accessor_int :sr
|
|
|
|
make_accessor_bool :asiosr, :monitoronsel, :slidermode
|
|
|
|
|
2023-07-22 13:05:38 +01:00
|
|
|
@delay = (0...remote.kind.phys_out).map { OptionDelay.new(remote, _1) }
|
2023-07-17 06:30:09 +01:00
|
|
|
@buffer = OptionBuffer.new(remote)
|
|
|
|
@mode = OptionMode.new(remote)
|
|
|
|
end
|
|
|
|
|
|
|
|
def identifier
|
|
|
|
:option
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-07-27 10:58:26 +01:00
|
|
|
class OptionDelay
|
|
|
|
include IRemote
|
|
|
|
|
2023-07-17 06:30:09 +01:00
|
|
|
def initialize(remote, i)
|
|
|
|
super
|
|
|
|
make_accessor_bool :on, :ab
|
|
|
|
end
|
|
|
|
|
|
|
|
def identifier
|
|
|
|
"option.delay"
|
|
|
|
end
|
|
|
|
|
|
|
|
def get
|
2023-07-27 17:44:02 +01:00
|
|
|
getter("[#{@index}]").to_i
|
2023-07-17 06:30:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def set(val)
|
2023-07-27 17:44:02 +01:00
|
|
|
setter("[#{@index}]", val)
|
2023-07-17 06:30:09 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-07-27 10:58:26 +01:00
|
|
|
class OptionBuffer
|
|
|
|
include IRemote
|
|
|
|
|
2023-07-17 06:30:09 +01:00
|
|
|
def initialize(remote)
|
|
|
|
super
|
|
|
|
make_accessor_int :mme, :wdm, :ks, :asio
|
|
|
|
end
|
|
|
|
|
|
|
|
def identifier
|
|
|
|
"option.buffer"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-07-27 10:58:26 +01:00
|
|
|
class OptionMode
|
|
|
|
include IRemote
|
|
|
|
|
2023-07-17 06:30:09 +01:00
|
|
|
def initialize(remote)
|
|
|
|
super
|
|
|
|
make_accessor_bool :exclusif, :swift
|
|
|
|
end
|
|
|
|
|
|
|
|
def identifier
|
|
|
|
"option.mode"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|