add device select to audio settings

This commit is contained in:
MihailRis
2025-11-04 19:47:35 +03:00
parent 25808d2b21
commit 88e61125d1
9 changed files with 91 additions and 10 deletions
+6 -2
View File
@@ -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