mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add device select to audio settings
This commit is contained in:
parent
25808d2b21
commit
88e61125d1
9 changed files with 91 additions and 10 deletions
|
|
@ -119,6 +119,8 @@ function on_hud_open()
|
|||
|
||||
hud.default_hand_controller = update_hand
|
||||
|
||||
debug.print(audio.get_input_devices_names())
|
||||
|
||||
stream = audio.PCMStream(44100, 1, 16)
|
||||
stream:share("test-stream")
|
||||
streamid = audio.play_stream_2d("test-stream", 2.0, 1.0, "ui")
|
||||
|
|
@ -147,7 +149,9 @@ function on_hud_render()
|
|||
end
|
||||
|
||||
if input_access_token then
|
||||
local bytes = audio.fetch_input(input_access_token)
|
||||
stream:feed(bytes)
|
||||
local bytes = audio.input.fetch_input(input_access_token)
|
||||
if bytes then
|
||||
stream:feed(bytes)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue