break instead of exit

This commit is contained in:
onyx-and-iris 2023-07-21 07:55:50 +01:00
parent 15585c90e9
commit 6dc21314e8

View File

@ -2,7 +2,6 @@ require_relative "../../lib/obsws"
require "yaml" require "yaml"
OBSWS::LOGGER.info! OBSWS::LOGGER.info!
DEVICE = "Desktop Audio"
module LevelTypes module LevelTypes
VU = 0 VU = 0
@ -11,6 +10,8 @@ module LevelTypes
end end
class Main class Main
DEVICE = "Desktop Audio"
def initialize(**kwargs) def initialize(**kwargs)
subs = OBSWS::Events::SUBS::LOW_VOLUME | OBSWS::Events::SUBS::INPUTVOLUMEMETERS subs = OBSWS::Events::SUBS::LOW_VOLUME | OBSWS::Events::SUBS::INPUTVOLUMEMETERS
@e_client = OBSWS::Events::Client.new(subs:, **kwargs) @e_client = OBSWS::Events::Client.new(subs:, **kwargs)
@ -19,7 +20,7 @@ class Main
def run def run
puts "press <Enter> to quit" puts "press <Enter> to quit"
exit if gets.chomp.empty? loop { break if gets.chomp.empty? }
end end
def on_input_mute_state_changed(data) def on_input_mute_state_changed(data)