mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +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})
|
table.insert(devices, {value=name, text=name})
|
||||||
end
|
end
|
||||||
selectbox.options = devices
|
selectbox.options = devices
|
||||||
local info = audio.__get_input_info()
|
local info = audio.input.get_input_info()
|
||||||
if info then
|
if info then
|
||||||
selectbox.value = info.device_specifier
|
selectbox.value = info.device_specifier
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ function audio.input.get_max_amplitude()
|
||||||
end
|
end
|
||||||
|
|
||||||
function audio.input.fetch(token, size)
|
function audio.input.fetch(token, size)
|
||||||
|
if not token then
|
||||||
|
error('nil passed instead of access token')
|
||||||
|
end
|
||||||
size = size or MAX_FETCH
|
size = size or MAX_FETCH
|
||||||
if audio_input_tokens_store[token] then
|
if audio_input_tokens_store[token] then
|
||||||
if #total_fetch >= size then
|
if #total_fetch >= size then
|
||||||
|
|
@ -61,3 +64,9 @@ function audio.input.__get_core_token()
|
||||||
return core_token
|
return core_token
|
||||||
end
|
end
|
||||||
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