update rakefile

rework examples
This commit is contained in:
2023-07-21 09:34:26 +01:00
parent 04775e8a3e
commit d8ee19e2f8
7 changed files with 66 additions and 20 deletions

View File

@@ -7,7 +7,8 @@ class Main
end
def run
exit if gets.chomp.empty?
puts "press <Enter> to quit"
loop { break if gets.chomp.empty? }
end
def on_pdirty
@@ -20,7 +21,7 @@ class Main
def on_midi
current = @vm.midi.current
puts "Value of midi button #{current}: #{@vm.midi.get(current)}"
puts "Value of midi input #{current}: #{@vm.midi.get(current)}"
end
def on_ldirty
@@ -30,7 +31,7 @@ class Main
end
end
if $0 == __FILE__
if $PROGRAM_NAME == __FILE__
Voicemeeter::Remote.new(:potato, pdirty: true, mdirty: true, midi: true, ldirty: true).run do |vm|
Main.new(vm).run
end

View File

@@ -10,7 +10,7 @@ class Main
def run
puts "press <Enter> to quit"
loop { exit if gets.chomp.empty? }
loop { break if gets.chomp.empty? }
end
def on_update(event)
@@ -28,7 +28,7 @@ class Main
end
if $0 == __FILE__
if $PROGRAM_NAME == __FILE__
Voicemeeter::Remote.new(:potato, midi: true).run do |vm|
Main.new(vm).run
end

View File

@@ -2,8 +2,4 @@
source "https://rubygems.org"
gem "voicemeeter", path: "../.."
gem "obsws", "~> 0.1.3"
gem "pathname", "~> 0.2.1"

View File

@@ -1,4 +1,4 @@
require "voicemeeter"
require_relative "../../lib/voicemeeter"
require "obsws"
require "yaml"
require "pathname"
@@ -59,7 +59,7 @@ def conn_from_yml
end
if $0 == __FILE__
if $PROGRAM_NAME == __FILE__
Voicemeeter::Remote.new(:potato).run do |vm|
Main.new(vm, **conn_from_yml).run
end