2023-07-14 17:07:56 +01:00
|
|
|
module Voicemeeter
|
2023-07-27 10:58:26 +01:00
|
|
|
class Command
|
|
|
|
include IRemote
|
2023-08-30 12:27:50 +01:00
|
|
|
extend MetaFunctions
|
2023-07-27 10:58:26 +01:00
|
|
|
|
2023-08-30 12:27:50 +01:00
|
|
|
attr_action_method :show, :restart, :shutdown
|
|
|
|
attr_writer_bool :showvbanchat, :lock
|
2023-07-14 17:07:56 +01:00
|
|
|
|
|
|
|
def identifier
|
|
|
|
:command
|
|
|
|
end
|
|
|
|
|
|
|
|
def hide
|
|
|
|
setter("show", 0)
|
|
|
|
end
|
|
|
|
|
|
|
|
def load(value)
|
|
|
|
raise VMError.new("load got: #{value}, but expected a string") unless value.is_a? String
|
|
|
|
setter("load", value)
|
|
|
|
sleep(0.2)
|
|
|
|
end
|
|
|
|
|
|
|
|
def save(value)
|
|
|
|
raise VMError.new("save got: #{value}, but expected a string") unless value.is_a? String
|
|
|
|
setter("save", value)
|
|
|
|
sleep(0.2)
|
|
|
|
end
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@remote.apply_config(:reset)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|