mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-24 19:00:49 +00:00
add :direction key assertion
This commit is contained in:
parent
2c5783b1a1
commit
89ee553bb4
@ -12,9 +12,10 @@ module Voicemeeter
|
||||
end
|
||||
|
||||
def getter(**kwargs)
|
||||
return @remote.get_num_devices(kwargs[:direction]) if kwargs[:index].nil?
|
||||
kwargs => {direction:}
|
||||
return @remote.get_num_devices(direction) unless kwargs.key? :index
|
||||
|
||||
vals = @remote.get_device_description(kwargs[:index], kwargs[:direction])
|
||||
vals = @remote.get_device_description(kwargs[:index], direction)
|
||||
types = {1 => "mme", 3 => "wdm", 4 => "ks", 5 => "asio"}
|
||||
{name: vals[0], type: types[vals[1]], id: vals[2]}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user