rename audio.input.fetch_input to audio.input.fetch
This commit is contained in:
parent
ebe8220548
commit
be1f336d90
@ -33,7 +33,7 @@ function on_open()
|
|||||||
document.root:add("<container id='tm' />")
|
document.root:add("<container id='tm' />")
|
||||||
local prev_amplitude = 0.0
|
local prev_amplitude = 0.0
|
||||||
document.tm:setInterval(16, function()
|
document.tm:setInterval(16, function()
|
||||||
audio.input.fetch_input(token)
|
audio.input.fetch(token)
|
||||||
local amplitude = audio.input.get_max_amplitude()
|
local amplitude = audio.input.get_max_amplitude()
|
||||||
if amplitude > 0.0 then
|
if amplitude > 0.0 then
|
||||||
amplitude = math.sqrt(amplitude)
|
amplitude = math.sqrt(amplitude)
|
||||||
|
|||||||
@ -24,7 +24,7 @@ function audio.input.get_max_amplitude()
|
|||||||
return max_amplitude / MAX_AMPLITUDE
|
return max_amplitude / MAX_AMPLITUDE
|
||||||
end
|
end
|
||||||
|
|
||||||
function audio.input.fetch_input(token, size)
|
function audio.input.fetch(token, size)
|
||||||
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
|
||||||
|
|||||||
@ -389,7 +389,7 @@ static int l_audio_count_streams(lua::State* L) {
|
|||||||
return lua::pushinteger(L, audio::count_streams());
|
return lua::pushinteger(L, audio::count_streams());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief audio.fetch_input(size) -> Bytearray
|
/// @brief audio.input.fetch(size) -> Bytearray
|
||||||
static int l_audio_fetch_input(lua::State* L) {
|
static int l_audio_fetch_input(lua::State* L) {
|
||||||
auto device = audio::get_input_device();
|
auto device = audio::get_input_device();
|
||||||
if (device == nullptr) {
|
if (device == nullptr) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user