diff --git a/lib/voicemeeter/cbindings.rb b/lib/voicemeeter/cbindings.rb index 662740d..0737de3 100644 --- a/lib/voicemeeter/cbindings.rb +++ b/lib/voicemeeter/cbindings.rb @@ -14,7 +14,7 @@ module Voicemeeter ffi_convention :stdcall private_class_method def self.attach_function(c_name, args, returns) - ruby_name = "bind_#{Util::String.snakecase(c_name.to_s.delete_prefix("VBVMR_"))}".to_sym + ruby_name = :"bind_#{Util::String.snakecase(c_name.to_s.delete_prefix("VBVMR_"))}" super(ruby_name, c_name, args, returns) end diff --git a/lib/voicemeeter/configs.rb b/lib/voicemeeter/configs.rb index 27e5b4c..87abe2b 100644 --- a/lib/voicemeeter/configs.rb +++ b/lib/voicemeeter/configs.rb @@ -2,8 +2,8 @@ module Voicemeeter module Configs class TOMLConfBuilder def self.run(kind) - aouts = (0...kind.phys_out).to_h { |i| ["A#{i + 1}".to_sym, false] } - bouts = (0...kind.virt_out).to_h { |i| ["B#{i + 1}".to_sym, false] } + aouts = (0...kind.phys_out).to_h { |i| [:"A#{i + 1}", false] } + bouts = (0...kind.virt_out).to_h { |i| [:"B#{i + 1}", false] } strip_bools = %i[mute mono solo].to_h { |param| [param, false] } gain = [:gain].to_h { |param| [param, 0.0] } @@ -24,7 +24,7 @@ module Voicemeeter virt_strip = (kind.phys_in...kind.phys_in + kind.virt_in).to_h do |i| [ - "strip-#{i}".to_sym, + :"strip-#{i}", {**aouts, **bouts, **strip_bools, **gain, **overrides} ] end @@ -32,7 +32,7 @@ module Voicemeeter bus_bools = %i[mute mono].to_h { |param| [param, false] } bus = (0...kind.num_bus).to_h do |i| - ["bus-#{i}".to_sym, {**bus_bools, **gain, **eq}] + [:"bus-#{i}", {**bus_bools, **gain, **eq}] end {**phys_strip, **virt_strip, **bus}