From 8b50c307e5b32ac39ffbbc5087c91a2a0f2ae812 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Mon, 13 Jul 2015 09:35:35 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../lua-bindings/auto/api/AudioEngine.lua | 8 ++++ .../auto/lua_cocos2dx_audioengine_auto.cpp | 37 +++++++++++++++++++ .../auto/lua_cocos2dx_audioengine_auto.hpp | 1 + 3 files changed, 46 insertions(+) diff --git a/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua b/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua index 9fcf68b382..5f4387f5dd 100644 --- a/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua +++ b/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua @@ -121,6 +121,14 @@ -- @param #float volume -- @return experimental::AudioEngine#experimental::AudioEngine self (return value: cc.experimental::AudioEngine) +-------------------------------- +-- Preload audio file.
+-- param filePath The file path of an audio. +-- @function [parent=#AudioEngine] preload +-- @param self +-- @param #string filePath +-- @return experimental::AudioEngine#experimental::AudioEngine self (return value: cc.experimental::AudioEngine) + -------------------------------- -- Play 2d sound.
-- param filePath The path of an audio file.
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp index cd28c13787..a899e762ed 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp @@ -590,6 +590,42 @@ int lua_cocos2dx_audioengine_AudioEngine_setVolume(lua_State* tolua_S) #endif return 0; } +int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_preload'", nullptr); + return 0; + } + cocos2d::experimental::AudioEngine::preload(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:preload",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_preload'.",&tolua_err); +#endif + return 0; +} int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S) { int argc = 0; @@ -968,6 +1004,7 @@ int lua_register_cocos2dx_audioengine_AudioEngine(lua_State* tolua_S) tolua_function(tolua_S,"pauseAll", lua_cocos2dx_audioengine_AudioEngine_pauseAll); tolua_function(tolua_S,"uncacheAll", lua_cocos2dx_audioengine_AudioEngine_uncacheAll); tolua_function(tolua_S,"setVolume", lua_cocos2dx_audioengine_AudioEngine_setVolume); + tolua_function(tolua_S,"preload", lua_cocos2dx_audioengine_AudioEngine_preload); tolua_function(tolua_S,"play2d", lua_cocos2dx_audioengine_AudioEngine_play2d); tolua_function(tolua_S,"getState", lua_cocos2dx_audioengine_AudioEngine_getState); tolua_function(tolua_S,"resume", lua_cocos2dx_audioengine_AudioEngine_resume); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.hpp index 8986dd181d..01e0146510 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.hpp @@ -37,6 +37,7 @@ int register_all_cocos2dx_audioengine(lua_State* tolua_S); + #endif // __cocos2dx_audioengine_h__