mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 11:22:00 +01:00
wtf is this
This commit is contained in:
14
src/fm95.c
14
src/fm95.c
@@ -243,11 +243,15 @@ int run_fm95(const FM95_Config config, FM95_Runtime* runtime) {
|
||||
mod_r = apply_preemphasis(&runtime->preemp_r, mod_r);
|
||||
}
|
||||
|
||||
lua_pushnumber(runtime->lua, mod_l);
|
||||
lua_setglobal(runtime->lua, "left");
|
||||
lua_pushnumber(runtime->lua, mod_r);
|
||||
lua_setglobal(runtime->lua, "right");
|
||||
lua_pcall(runtime->lua, 0, 0, 0);
|
||||
lua_rawgeti(L, LUA_REGISTRYINDEX, runtime->script_ref);
|
||||
lua_pushnumber(L, mod_l); // Argument 1
|
||||
lua_pushnumber(L, mod_r); // Argument 2
|
||||
|
||||
if (lua_pcall(L, 2, 2, 0) == LUA_OK) { // 2 args, 2 results
|
||||
mod_r = lua_tonumber(L, -1);
|
||||
mod_l = lua_tonumber(L, -2);
|
||||
lua_pop(L, 2);
|
||||
}
|
||||
|
||||
mpx = stereo_encode(&runtime->stencode, config.stereo, mod_l, mod_r);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user