#if USE_UNI_LUA using LuaAPI = UniLua.Lua; using RealStatePtr = UniLua.ILuaState; using LuaCSFunction = UniLua.CSharpFunctionDelegate; #else using LuaAPI = XLua.LuaDLL.Lua; using RealStatePtr = System.IntPtr; using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; #endif using XLua; using System.Collections.Generic; namespace XLua.CSObjectWrap { using Utils = XLua.Utils; public class UnityEngineAudioConfigurationWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.AudioConfiguration); Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 5); Utils.RegisterFunc(L, Utils.GETTER_IDX, "speakerMode", _g_get_speakerMode); Utils.RegisterFunc(L, Utils.GETTER_IDX, "dspBufferSize", _g_get_dspBufferSize); Utils.RegisterFunc(L, Utils.GETTER_IDX, "sampleRate", _g_get_sampleRate); Utils.RegisterFunc(L, Utils.GETTER_IDX, "numRealVoices", _g_get_numRealVoices); Utils.RegisterFunc(L, Utils.GETTER_IDX, "numVirtualVoices", _g_get_numVirtualVoices); Utils.RegisterFunc(L, Utils.SETTER_IDX, "speakerMode", _s_set_speakerMode); Utils.RegisterFunc(L, Utils.SETTER_IDX, "dspBufferSize", _s_set_dspBufferSize); Utils.RegisterFunc(L, Utils.SETTER_IDX, "sampleRate", _s_set_sampleRate); Utils.RegisterFunc(L, Utils.SETTER_IDX, "numRealVoices", _s_set_numRealVoices); Utils.RegisterFunc(L, Utils.SETTER_IDX, "numVirtualVoices", _s_set_numVirtualVoices); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(UnityEngine.AudioConfiguration)); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AudioConfiguration constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_speakerMode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.speakerMode); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_dspBufferSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.dspBufferSize); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_sampleRate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.sampleRate); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_numRealVoices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.numRealVoices); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_numVirtualVoices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.numVirtualVoices); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_speakerMode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); UnityEngine.AudioSpeakerMode gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.speakerMode = gen_value; translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_dspBufferSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.dspBufferSize = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_sampleRate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.sampleRate = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_numRealVoices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.numRealVoices = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_numVirtualVoices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AudioConfiguration gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.numVirtualVoices = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }