return 0;
}
+int Nageru_schedule_cut(lua_State *L)
+{
+ if (global_mixer == nullptr) {
+ luaL_error(L, "Cuts can not be scheduled before the theme is done initializing.");
+ }
+ global_mixer->schedule_cut();
+ return 0;
+}
+
int Nageru_get_audio_bus_eq_level_db(lua_State *L)
{
if (global_audio_mixer == nullptr) {
{ "get_audio_bus_mute", Nageru_get_audio_bus_mute },
{ "set_audio_bus_mute", Nageru_set_audio_bus_mute },
+ // Misc.
+ { "schedule_cut", Nageru_schedule_cut },
+
{ nullptr, nullptr }
};
lua_pushlightuserdata(L, this);
lua_pop(L, 1);
unsigned flags = 0;
- if (lua_objlen(L, -1) > 2) {
- lua_rawgeti(L, -1, 3);
+ if (lua_objlen(L, index) > 2) {
+ lua_rawgeti(L, index, 3);
flags = luaL_checknumber(L, -1);
lua_pop(L, 1);
}