From 721fb53012e8ea87f83a39b03c25543ab627494c Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 17 Jul 2023 19:59:49 +0100 Subject: [PATCH] added delay reader method --- lib/voicemeeter/base.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/voicemeeter/base.rb b/lib/voicemeeter/base.rb index c4c0ef1..55ffff5 100644 --- a/lib/voicemeeter/base.rb +++ b/lib/voicemeeter/base.rb @@ -14,15 +14,17 @@ module Voicemeeter include Worker include Util::Cache - attr_reader :kind, :midi, :event, :running, :callback + attr_reader :kind, :midi, :event, :running, :callback, :delay attr_accessor :cache RATELIMIT = 0.033 + DELAY = 0.001 def initialize(kind, **kwargs) @kind = kind @sync = kwargs[:sync] || false @ratelimit = kwargs[:ratelimit] || RATELIMIT + @delay = kwargs[:delay] || DELAY @midi = Midi.new @event = Events::Tracker.new(