From 8f985ecb949153ea453e5dd18f2785c1ca56dcde Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 6 Aug 2023 18:02:48 +0100 Subject: [PATCH] use cache attr reader --- lib/voicemeeter/worker.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/voicemeeter/worker.rb b/lib/voicemeeter/worker.rb index 1f21ac6..fc3e548 100644 --- a/lib/voicemeeter/worker.rb +++ b/lib/voicemeeter/worker.rb @@ -26,9 +26,9 @@ module Voicemeeter def init_worker(que) logger.info "Listening for #{event.get.join(", ")} events" - @cache[:strip_level], @cache[:bus_level] = _get_levels - @cache[:strip_comp] = Array.new(kind.num_strip_levels, false) - @cache[:bus_comp] = Array.new(kind.num_bus_levels, false) + cache[:strip_level], cache[:bus_level] = _get_levels + cache[:strip_comp] = Array.new(kind.num_strip_levels, false) + cache[:bus_comp] = Array.new(kind.num_bus_levels, false) Thread.new do Thread.current.name = "worker" while (event = que.pop)