2022-08-08 18:02:17 +08:00
|
|
|
#include "scripting/lua-bindings/auto/axlua_audioengine_auto.hpp"
|
2022-07-15 19:17:01 +08:00
|
|
|
#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || AX_TARGET_PLATFORM == AX_PLATFORM_WIN32 || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX
|
2022-01-03 11:34:58 +08:00
|
|
|
#include "audio/AudioEngine.h"
|
2016-03-22 16:08:28 +08:00
|
|
|
#include "scripting/lua-bindings/manual/tolua_fix.h"
|
|
|
|
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2022-08-29 20:51:22 +08:00
|
|
|
int lua_ax_audioengine_AudioProfile_constructor(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
2022-08-29 20:51:22 +08:00
|
|
|
ax::AudioProfile* cobj = nullptr;
|
2015-09-29 15:45:48 +08:00
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S)-1;
|
|
|
|
if (argc == 0)
|
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioProfile_constructor'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2022-08-29 20:51:22 +08:00
|
|
|
cobj = new ax::AudioProfile();
|
2022-07-12 21:31:54 +08:00
|
|
|
tolua_pushusertype(tolua_S,(void*)cobj,"ax.AudioProfile");
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
|
|
|
|
return 1;
|
|
|
|
}
|
2022-07-12 21:31:54 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.AudioProfile:AudioProfile",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioProfile_constructor'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-08-29 20:51:22 +08:00
|
|
|
static int lua_ax_audioengine_AudioProfile_finalize(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
printf("luabindings: finalizing LUA object (AudioProfile)");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-08-29 20:51:22 +08:00
|
|
|
int lua_register_ax_audioengine_AudioProfile(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2022-07-12 21:31:54 +08:00
|
|
|
tolua_usertype(tolua_S,"ax.AudioProfile");
|
|
|
|
tolua_cclass(tolua_S,"AudioProfile","ax.AudioProfile","",nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
tolua_beginmodule(tolua_S,"AudioProfile");
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"new",lua_ax_audioengine_AudioProfile_constructor);
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_endmodule(tolua_S);
|
2022-08-29 20:51:22 +08:00
|
|
|
auto typeName = typeid(ax::AudioProfile).name(); // rtti is literal storage
|
2022-07-12 21:31:54 +08:00
|
|
|
g_luaType[reinterpret_cast<uintptr_t>(typeName)] = "ax.AudioProfile";
|
|
|
|
g_typeCast[typeName] = "ax.AudioProfile";
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2022-08-29 20:51:22 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_lazyInit(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 0)
|
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_lazyInit'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2022-10-12 14:22:45 +08:00
|
|
|
auto&& ret = ax::AudioEngine::lazyInit();
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_pushboolean(tolua_S,(bool)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
2022-07-12 21:31:54 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:lazyInit",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_lazyInit'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_end(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 0)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_end'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::end();
|
|
|
|
lua_settop(tolua_S, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:end",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_end'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getDefaultProfile(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 0)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getDefaultProfile'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::getDefaultProfile();
|
|
|
|
object_to_luaval<ax::AudioProfile>(tolua_S, "ax.AudioProfile",(ax::AudioProfile*)ret);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getDefaultProfile",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getDefaultProfile'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
2021-12-28 15:46:32 +08:00
|
|
|
std::string_view arg0;
|
2023-02-14 23:38:16 +08:00
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:play2d");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_play2d'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::play2d(arg0);
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 2)
|
|
|
|
{
|
|
|
|
std::string_view arg0;
|
|
|
|
bool arg1;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:play2d");
|
|
|
|
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ax.AudioEngine:play2d");
|
|
|
|
if(!ok)
|
|
|
|
{
|
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_play2d'", nullptr);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
auto&& ret = ax::AudioEngine::play2d(arg0, arg1);
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (argc == 3)
|
|
|
|
{
|
|
|
|
std::string_view arg0;
|
|
|
|
bool arg1;
|
|
|
|
double arg2;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:play2d");
|
|
|
|
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ax.AudioEngine:play2d");
|
|
|
|
ok &= luaval_to_number(tolua_S, 4,&arg2, "ax.AudioEngine:play2d");
|
|
|
|
if(!ok)
|
|
|
|
{
|
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_play2d'", nullptr);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
auto&& ret = ax::AudioEngine::play2d(arg0, arg1, arg2);
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (argc == 4)
|
|
|
|
{
|
|
|
|
std::string_view arg0;
|
|
|
|
bool arg1;
|
|
|
|
double arg2;
|
|
|
|
const ax::AudioProfile* arg3;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:play2d");
|
|
|
|
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ax.AudioEngine:play2d");
|
|
|
|
ok &= luaval_to_number(tolua_S, 4,&arg2, "ax.AudioEngine:play2d");
|
|
|
|
ok &= luaval_to_object<const ax::AudioProfile>(tolua_S, 5, "ax.AudioProfile",&arg3, "ax.AudioEngine:play2d");
|
|
|
|
if(!ok)
|
|
|
|
{
|
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_play2d'", nullptr);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
auto&& ret = ax::AudioEngine::play2d(arg0, arg1, arg2, arg3);
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:play2d",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_play2d'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_setLoop(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 2)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
bool arg1;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:setLoop");
|
|
|
|
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ax.AudioEngine:setLoop");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_setLoop'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::setLoop(arg0, arg1);
|
2015-09-29 15:45:48 +08:00
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:setLoop",argc, 2);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_setLoop'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_isLoop(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:isLoop");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_isLoop'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::isLoop(arg0);
|
|
|
|
tolua_pushboolean(tolua_S,(bool)ret);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:isLoop",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_isLoop'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_setVolume(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 2)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int arg0;
|
2023-02-14 23:38:16 +08:00
|
|
|
double arg1;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:setVolume");
|
|
|
|
ok &= luaval_to_number(tolua_S, 3,&arg1, "ax.AudioEngine:setVolume");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_setVolume'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::setVolume(arg0, arg1);
|
2015-09-29 15:45:48 +08:00
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:setVolume",argc, 2);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_setVolume'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getVolume(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:getVolume");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getVolume'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::getVolume(arg0);
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getVolume",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getVolume'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_pause(lua_State* tolua_S)
|
2017-06-05 13:37:50 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2017-06-05 13:37:50 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2017-06-05 13:37:50 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2017-06-05 13:37:50 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:pause");
|
2017-06-05 13:37:50 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_pause'", nullptr);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::pause(arg0);
|
|
|
|
lua_settop(tolua_S, 1);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:pause",argc, 1);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2017-06-05 13:37:50 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_pause'.",&tolua_err);
|
2017-06-05 13:37:50 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_pauseAll(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 0)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_pauseAll'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::pauseAll();
|
|
|
|
lua_settop(tolua_S, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:pauseAll",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_pauseAll'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_resume(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
|
|
|
int arg0;
|
2023-02-14 23:38:16 +08:00
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:resume");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_resume'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::resume(arg0);
|
|
|
|
lua_settop(tolua_S, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:resume",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_resume'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_resumeAll(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 0)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_resumeAll'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::resumeAll();
|
|
|
|
lua_settop(tolua_S, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:resumeAll",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_resumeAll'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_stop(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:stop");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_stop'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::stop(arg0);
|
2015-09-29 15:45:48 +08:00
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:stop",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_stop'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_stopAll(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 0)
|
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_stopAll'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::stopAll();
|
2015-09-29 15:45:48 +08:00
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:stopAll",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_stopAll'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_setCurrentTime(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 2)
|
|
|
|
{
|
|
|
|
int arg0;
|
|
|
|
double arg1;
|
2023-02-14 23:38:16 +08:00
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:setCurrentTime");
|
|
|
|
ok &= luaval_to_number(tolua_S, 3,&arg1, "ax.AudioEngine:setCurrentTime");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_setCurrentTime'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::setCurrentTime(arg0, arg1);
|
|
|
|
tolua_pushboolean(tolua_S,(bool)ret);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:setCurrentTime",argc, 2);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_setCurrentTime'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getCurrentTime(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
2023-02-14 23:38:16 +08:00
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:getCurrentTime");
|
|
|
|
if(!ok)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getCurrentTime'", nullptr);
|
|
|
|
return 0;
|
2015-09-29 15:45:48 +08:00
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::getCurrentTime(arg0);
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getCurrentTime",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getCurrentTime'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getDuration(lua_State* tolua_S)
|
2017-06-05 13:37:50 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2017-06-05 13:37:50 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2017-06-05 13:37:50 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:getDuration");
|
2017-06-05 13:37:50 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getDuration'", nullptr);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::getDuration(arg0);
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getDuration",argc, 1);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2017-06-05 13:37:50 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getDuration'.",&tolua_err);
|
2017-06-05 13:37:50 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getState(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:getState");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getState'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int ret = (int)ax::AudioEngine::getState(arg0);
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getState",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getState'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getMaxAudioInstance(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 0)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getMaxAudioInstance'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::getMaxAudioInstance();
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getMaxAudioInstance",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getMaxAudioInstance'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_setMaxAudioInstance(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
|
|
|
int arg0;
|
2023-02-14 23:38:16 +08:00
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:setMaxAudioInstance");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_setMaxAudioInstance'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::setMaxAudioInstance(arg0);
|
|
|
|
tolua_pushboolean(tolua_S,(bool)ret);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:setMaxAudioInstance",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_setMaxAudioInstance'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_uncache(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
std::string_view arg0;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:uncache");
|
2015-09-29 15:45:48 +08:00
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_uncache'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::uncache(arg0);
|
2015-09-29 15:45:48 +08:00
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:uncache",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_uncache'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_uncacheAll(lua_State* tolua_S)
|
2016-06-16 10:58:46 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2016-06-16 10:58:46 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2016-06-16 10:58:46 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 0)
|
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_uncacheAll'", nullptr);
|
2016-06-16 10:58:46 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::uncacheAll();
|
2016-06-16 10:58:46 +08:00
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:uncacheAll",argc, 0);
|
2016-06-16 10:58:46 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2016-06-16 10:58:46 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_uncacheAll'.",&tolua_err);
|
2016-06-16 10:58:46 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getProfile(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
argc = lua_gettop(tolua_S)-1;
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
do
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
std::string_view arg0;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:getProfile");
|
|
|
|
if (!ok) { break; }
|
|
|
|
ax::AudioProfile* ret = ax::AudioEngine::getProfile(arg0);
|
|
|
|
object_to_luaval<ax::AudioProfile>(tolua_S, "ax.AudioProfile",(ax::AudioProfile*)ret);
|
|
|
|
return 1;
|
2015-09-29 15:45:48 +08:00
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
} while (0);
|
|
|
|
ok = true;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
|
|
|
int arg0;
|
|
|
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.AudioEngine:getProfile");
|
|
|
|
if (!ok) { break; }
|
|
|
|
ax::AudioProfile* ret = ax::AudioEngine::getProfile(arg0);
|
|
|
|
object_to_luaval<ax::AudioProfile>(tolua_S, "ax.AudioProfile",(ax::AudioProfile*)ret);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
} while (0);
|
|
|
|
ok = true;
|
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "ax.AudioEngine:getProfile",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getProfile'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_preload(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
argc = lua_gettop(tolua_S)-1;
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
do
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 2)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
std::string_view arg0;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:preload");
|
|
|
|
if (!ok) { break; }
|
|
|
|
std::function<void (bool)> arg1;
|
|
|
|
do {
|
|
|
|
// Lambda binding for lua is not supported.
|
|
|
|
assert(false);
|
|
|
|
} while(0)
|
|
|
|
;
|
|
|
|
if (!ok) { break; }
|
|
|
|
ax::AudioEngine::preload(arg0, arg1);
|
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
2015-09-29 15:45:48 +08:00
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
} while (0);
|
|
|
|
ok = true;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
|
|
|
std::string_view arg0;
|
|
|
|
ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "ax.AudioEngine:preload");
|
|
|
|
if (!ok) { break; }
|
|
|
|
ax::AudioEngine::preload(arg0);
|
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
} while (0);
|
|
|
|
ok = true;
|
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "ax.AudioEngine:preload",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_preload'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_getPlayingAudioCount(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 0)
|
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_getPlayingAudioCount'", nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::getPlayingAudioCount();
|
|
|
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:getPlayingAudioCount",argc, 0);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_getPlayingAudioCount'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_setEnabled(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
2023-02-14 23:38:16 +08:00
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2023-02-14 23:38:16 +08:00
|
|
|
if (argc == 1)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
bool arg0;
|
|
|
|
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ax.AudioEngine:setEnabled");
|
|
|
|
if(!ok)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_setEnabled'", nullptr);
|
|
|
|
return 0;
|
2015-09-29 15:45:48 +08:00
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
ax::AudioEngine::setEnabled(arg0);
|
|
|
|
lua_settop(tolua_S, 1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:setEnabled",argc, 1);
|
2015-09-29 15:45:48 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_setEnabled'.",&tolua_err);
|
2015-09-29 15:45:48 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
int lua_ax_audioengine_AudioEngine_isEnabled(lua_State* tolua_S)
|
2017-06-05 13:37:50 +08:00
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
bool ok = true;
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2017-06-05 13:37:50 +08:00
|
|
|
tolua_Error tolua_err;
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2022-07-12 21:31:54 +08:00
|
|
|
if (!tolua_isusertable(tolua_S,1,"ax.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
2017-06-05 13:37:50 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
argc = lua_gettop(tolua_S) - 1;
|
|
|
|
|
|
|
|
if (argc == 0)
|
|
|
|
{
|
|
|
|
if(!ok)
|
|
|
|
{
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_audioengine_AudioEngine_isEnabled'", nullptr);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 0;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
auto&& ret = ax::AudioEngine::isEnabled();
|
|
|
|
tolua_pushboolean(tolua_S,(bool)ret);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2023-02-14 23:38:16 +08:00
|
|
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.AudioEngine:isEnabled",argc, 0);
|
2017-06-05 13:37:50 +08:00
|
|
|
return 0;
|
2022-08-08 18:02:17 +08:00
|
|
|
#if _AX_DEBUG >= 1
|
2017-06-05 13:37:50 +08:00
|
|
|
tolua_lerror:
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_error(tolua_S,"#ferror in function 'lua_ax_audioengine_AudioEngine_isEnabled'.",&tolua_err);
|
2017-06-05 13:37:50 +08:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2022-08-29 20:51:22 +08:00
|
|
|
static int lua_ax_audioengine_AudioEngine_finalize(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
|
|
|
printf("luabindings: finalizing LUA object (AudioEngine)");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-08-29 20:51:22 +08:00
|
|
|
int lua_register_ax_audioengine_AudioEngine(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2022-07-12 21:31:54 +08:00
|
|
|
tolua_usertype(tolua_S,"ax.AudioEngine");
|
|
|
|
tolua_cclass(tolua_S,"AudioEngine","ax.AudioEngine","",nullptr);
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
tolua_beginmodule(tolua_S,"AudioEngine");
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"lazyInit", lua_ax_audioengine_AudioEngine_lazyInit);
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_function(tolua_S,"endToLua", lua_ax_audioengine_AudioEngine_end);
|
|
|
|
tolua_function(tolua_S,"getDefaultProfile", lua_ax_audioengine_AudioEngine_getDefaultProfile);
|
|
|
|
tolua_function(tolua_S,"play2d", lua_ax_audioengine_AudioEngine_play2d);
|
|
|
|
tolua_function(tolua_S,"setLoop", lua_ax_audioengine_AudioEngine_setLoop);
|
|
|
|
tolua_function(tolua_S,"isLoop", lua_ax_audioengine_AudioEngine_isLoop);
|
|
|
|
tolua_function(tolua_S,"setVolume", lua_ax_audioengine_AudioEngine_setVolume);
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"getVolume", lua_ax_audioengine_AudioEngine_getVolume);
|
|
|
|
tolua_function(tolua_S,"pause", lua_ax_audioengine_AudioEngine_pause);
|
|
|
|
tolua_function(tolua_S,"pauseAll", lua_ax_audioengine_AudioEngine_pauseAll);
|
|
|
|
tolua_function(tolua_S,"resume", lua_ax_audioengine_AudioEngine_resume);
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_function(tolua_S,"resumeAll", lua_ax_audioengine_AudioEngine_resumeAll);
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"stop", lua_ax_audioengine_AudioEngine_stop);
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_function(tolua_S,"stopAll", lua_ax_audioengine_AudioEngine_stopAll);
|
|
|
|
tolua_function(tolua_S,"setCurrentTime", lua_ax_audioengine_AudioEngine_setCurrentTime);
|
|
|
|
tolua_function(tolua_S,"getCurrentTime", lua_ax_audioengine_AudioEngine_getCurrentTime);
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"getDuration", lua_ax_audioengine_AudioEngine_getDuration);
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_function(tolua_S,"getState", lua_ax_audioengine_AudioEngine_getState);
|
|
|
|
tolua_function(tolua_S,"getMaxAudioInstance", lua_ax_audioengine_AudioEngine_getMaxAudioInstance);
|
|
|
|
tolua_function(tolua_S,"setMaxAudioInstance", lua_ax_audioengine_AudioEngine_setMaxAudioInstance);
|
|
|
|
tolua_function(tolua_S,"uncache", lua_ax_audioengine_AudioEngine_uncache);
|
|
|
|
tolua_function(tolua_S,"uncacheAll", lua_ax_audioengine_AudioEngine_uncacheAll);
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"getProfile", lua_ax_audioengine_AudioEngine_getProfile);
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_function(tolua_S,"preload", lua_ax_audioengine_AudioEngine_preload);
|
2022-08-29 20:51:22 +08:00
|
|
|
tolua_function(tolua_S,"getPlayingAudioCount", lua_ax_audioengine_AudioEngine_getPlayingAudioCount);
|
2023-02-14 23:38:16 +08:00
|
|
|
tolua_function(tolua_S,"setEnabled", lua_ax_audioengine_AudioEngine_setEnabled);
|
|
|
|
tolua_function(tolua_S,"isEnabled", lua_ax_audioengine_AudioEngine_isEnabled);
|
2015-09-29 15:45:48 +08:00
|
|
|
tolua_endmodule(tolua_S);
|
2022-08-29 20:51:22 +08:00
|
|
|
auto typeName = typeid(ax::AudioEngine).name(); // rtti is literal storage
|
2022-07-12 21:31:54 +08:00
|
|
|
g_luaType[reinterpret_cast<uintptr_t>(typeName)] = "ax.AudioEngine";
|
|
|
|
g_typeCast[typeName] = "ax.AudioEngine";
|
2015-09-29 15:45:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2022-08-29 20:51:22 +08:00
|
|
|
TOLUA_API int register_all_ax_audioengine(lua_State* tolua_S)
|
2015-09-29 15:45:48 +08:00
|
|
|
{
|
2016-04-28 09:56:50 +08:00
|
|
|
tolua_open(tolua_S);
|
|
|
|
|
2022-07-12 21:31:54 +08:00
|
|
|
tolua_module(tolua_S,"ax",0);
|
|
|
|
tolua_beginmodule(tolua_S,"ax");
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2022-08-29 20:51:22 +08:00
|
|
|
lua_register_ax_audioengine_AudioProfile(tolua_S);
|
|
|
|
lua_register_ax_audioengine_AudioEngine(tolua_S);
|
2015-09-29 15:45:48 +08:00
|
|
|
|
2016-04-28 09:56:50 +08:00
|
|
|
tolua_endmodule(tolua_S);
|
|
|
|
return 1;
|
2015-09-29 15:45:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|