mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2025-01-18 13:30:48 +00:00
break instead of exit
This commit is contained in:
parent
15585c90e9
commit
6dc21314e8
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user