diff --git a/res/layouts/pages/settings_audio.xml.lua b/res/layouts/pages/settings_audio.xml.lua
index 29859819..95166930 100644
--- a/res/layouts/pages/settings_audio.xml.lua
+++ b/res/layouts/pages/settings_audio.xml.lua
@@ -29,7 +29,7 @@ local initialized = false
function on_open()
if not initialized then
initialized = true
- local token = audio.input.__get_core_token()
+ local token = core.get_core_token()
document.root:add("")
local prev_amplitude = 0.0
document.tm:setInterval(16, function()
@@ -54,16 +54,16 @@ function on_open()
create_setting("audio.volume-music", "Music", 0.01)
document.root:add("")
document.root:add("")
+ "onselect='function(opt) audio.__set_input_device(opt) end'/>")
document.root:add(""
..""
.."")
local selectbox = document.input_device_select
local devices = {}
- local names = audio.get_input_devices_names()
+ local names = audio.__get_input_devices_names()
for i, name in ipairs(names) do
table.insert(devices, {value=name, text=name})
end
selectbox.options = devices
- selectbox.value = audio.get_input_info().device_specifier
+ selectbox.value = audio.__get_input_info().device_specifier
end
diff --git a/res/scripts/stdlib.lua b/res/scripts/stdlib.lua
index f8cb1c07..e410b62a 100644
--- a/res/scripts/stdlib.lua
+++ b/res/scripts/stdlib.lua
@@ -445,6 +445,7 @@ local __post_runnables = {}
local fn_audio_reset_fetch_buffer = audio.__reset_fetch_buffer
audio.__reset_fetch_buffer = nil
+core.get_core_token = audio.input.__get_core_token
function __process_post_runnables()
if #__post_runnables then
diff --git a/src/logic/scripting/lua/libs/libaudio.cpp b/src/logic/scripting/lua/libs/libaudio.cpp
index b80676c1..9a67c913 100644
--- a/src/logic/scripting/lua/libs/libaudio.cpp
+++ b/src/logic/scripting/lua/libs/libaudio.cpp
@@ -480,9 +480,9 @@ const luaL_Reg audiolib[] = {
{"count_speakers", lua::wrap},
{"count_streams", lua::wrap},
{"__fetch_input", lua::wrap},
- {"get_input_devices_names", lua::wrap},
- {"get_output_devices_names", lua::wrap},
- {"set_input_device", lua::wrap},
- {"get_input_info", lua::wrap},
+ {"__get_input_devices_names", lua::wrap},
+ {"__get_output_devices_names", lua::wrap},
+ {"__set_input_device", lua::wrap},
+ {"__get_input_info", lua::wrap},
{nullptr, nullptr}
};