mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
add audio.input.get_input_info
This commit is contained in:
parent
58fc5e944d
commit
a4b52b241c
2 changed files with 10 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ function on_open()
|
|||
table.insert(devices, {value=name, text=name})
|
||||
end
|
||||
selectbox.options = devices
|
||||
local info = audio.__get_input_info()
|
||||
local info = audio.input.get_input_info()
|
||||
if info then
|
||||
selectbox.value = info.device_specifier
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ function audio.input.get_max_amplitude()
|
|||
end
|
||||
|
||||
function audio.input.fetch(token, size)
|
||||
if not token then
|
||||
error('nil passed instead of access token')
|
||||
end
|
||||
size = size or MAX_FETCH
|
||||
if audio_input_tokens_store[token] then
|
||||
if #total_fetch >= size then
|
||||
|
|
@ -61,3 +64,9 @@ function audio.input.__get_core_token()
|
|||
return core_token
|
||||
end
|
||||
end
|
||||
|
||||
local audio_get_input_info = audio.__get_input_info
|
||||
|
||||
function audio.input.get_input_info()
|
||||
return audio_get_input_info()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue