mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2025-01-18 21:40:48 +00:00
add low, high, all constants to SUBS
This commit is contained in:
parent
449684c405
commit
f1a1c970e0
@ -7,38 +7,30 @@ module OBSWS
|
|||||||
module Events
|
module Events
|
||||||
module SUBS
|
module SUBS
|
||||||
NONE = 0
|
NONE = 0
|
||||||
GENERAL = (1 << 0)
|
GENERAL = 1 << 0
|
||||||
CONFIG = (1 << 1)
|
CONFIG = 1 << 1
|
||||||
SCENES = (1 << 2)
|
SCENES = 1 << 2
|
||||||
INPUTS = (1 << 3)
|
INPUTS = 1 << 3
|
||||||
TRANSITIONS = (1 << 4)
|
TRANSITIONS = 1 << 4
|
||||||
FILTERS = (1 << 5)
|
FILTERS = 1 << 5
|
||||||
OUTPUTS = (1 << 6)
|
OUTPUTS = 1 << 6
|
||||||
SCENEITEMS = (1 << 7)
|
SCENEITEMS = 1 << 7
|
||||||
MEDIAINPUTS = (1 << 8)
|
MEDIAINPUTS = 1 << 8
|
||||||
VENDORS = (1 << 9)
|
VENDORS = 1 << 9
|
||||||
UI = (1 << 10)
|
UI = 1 << 10
|
||||||
|
|
||||||
def low_volume
|
LOW_VOLUME = GENERAL | CONFIG | SCENES | INPUTS | TRANSITIONS | FILTERS | OUTPUTS |
|
||||||
GENERAL | CONFIG | SCENES | INPUTS | TRANSITIONS | FILTERS | OUTPUTS |
|
|
||||||
SCENEITEMS | MEDIAINPUTS | VENDORS | UI
|
SCENEITEMS | MEDIAINPUTS | VENDORS | UI
|
||||||
end
|
|
||||||
|
|
||||||
INPUTVOLUMEMETERS = (1 << 16)
|
INPUTVOLUMEMETERS = 1 << 16
|
||||||
INPUTACTIVESTATECHANGED = (1 << 17)
|
INPUTACTIVESTATECHANGED = 1 << 17
|
||||||
INPUTSHOWSTATECHANGED = (1 << 18)
|
INPUTSHOWSTATECHANGED = 1 << 18
|
||||||
SCENEITEMTRANSFORMCHANGED = (1 << 19)
|
SCENEITEMTRANSFORMCHANGED = 1 << 19
|
||||||
|
|
||||||
def high_volume
|
HIGH_VOLUME = INPUTVOLUMEMETERS | INPUTACTIVESTATECHANGED | INPUTSHOWSTATECHANGED |
|
||||||
INPUTVOLUMEMETERS | INPUTACTIVESTATECHANGED | INPUTSHOWSTATECHANGED |
|
|
||||||
SCENEITEMTRANSFORMCHANGED
|
SCENEITEMTRANSFORMCHANGED
|
||||||
end
|
|
||||||
|
|
||||||
def all
|
ALL = LOW_VOLUME | HIGH_VOLUME
|
||||||
low_volume | high_volume
|
|
||||||
end
|
|
||||||
|
|
||||||
module_function :low_volume, :high_volume, :all
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module Callbacks
|
module Callbacks
|
||||||
@ -75,7 +67,7 @@ module OBSWS
|
|||||||
include Mixin::OPCodes
|
include Mixin::OPCodes
|
||||||
|
|
||||||
def initialize(**kwargs)
|
def initialize(**kwargs)
|
||||||
kwargs[:subs] = SUBS.low_volume
|
kwargs[:subs] ||= SUBS::LOW_VOLUME
|
||||||
@base_client = Base.new(**kwargs)
|
@base_client = Base.new(**kwargs)
|
||||||
LOGGER.info("#{self} succesfully identified with server")
|
LOGGER.info("#{self} succesfully identified with server")
|
||||||
@base_client.add_observer(self)
|
@base_client.add_observer(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user