added delay reader method

This commit is contained in:
onyx-and-iris 2023-07-17 19:59:49 +01:00
parent 9dfda173da
commit 721fb53012

View File

@ -14,15 +14,17 @@ module Voicemeeter
include Worker include Worker
include Util::Cache include Util::Cache
attr_reader :kind, :midi, :event, :running, :callback attr_reader :kind, :midi, :event, :running, :callback, :delay
attr_accessor :cache attr_accessor :cache
RATELIMIT = 0.033 RATELIMIT = 0.033
DELAY = 0.001
def initialize(kind, **kwargs) def initialize(kind, **kwargs)
@kind = kind @kind = kind
@sync = kwargs[:sync] || false @sync = kwargs[:sync] || false
@ratelimit = kwargs[:ratelimit] || RATELIMIT @ratelimit = kwargs[:ratelimit] || RATELIMIT
@delay = kwargs[:delay] || DELAY
@midi = Midi.new @midi = Midi.new
@event = @event =
Events::Tracker.new( Events::Tracker.new(