mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
add :direction key assertion
This commit is contained in:
parent
2c5783b1a1
commit
89ee553bb4
@ -12,9 +12,10 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def getter(**kwargs)
|
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"}
|
types = {1 => "mme", 3 => "wdm", 4 => "ks", 5 => "asio"}
|
||||||
{name: vals[0], type: types[vals[1]], id: vals[2]}
|
{name: vals[0], type: types[vals[1]], id: vals[2]}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user