using System; using System.Collections.Generic; using System.Reflection; using System.Runtime.InteropServices; using UnityFusion.CLR.TypeSystem; using UnityFusion.CLR.Method; using UnityFusion.Runtime.Enviorment; using UnityFusion.Runtime.Intepreter; using UnityFusion.Runtime.Stack; using UnityFusion.Reflection; using UnityFusion.CLR.Utils; #if DEBUG && !DISABLE_UNITYFUSION_DEBUG using AutoList = System.Collections.Generic.List; #else using AutoList = UnityFusion.Other.UncheckedList; #endif namespace UnityFusion.Runtime.Generated { unsafe class UnityEngine_AudioClip_Binding { public static void Register(UnityFusion.Runtime.Enviorment.AppDomain app) { BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; MethodBase method; Type[] args; Type type = typeof(UnityEngine.AudioClip); args = new Type[]{}; method = type.GetMethod("get_length", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_length_0); args = new Type[]{}; method = type.GetMethod("get_samples", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_samples_1); args = new Type[]{}; method = type.GetMethod("get_channels", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_channels_2); args = new Type[]{}; method = type.GetMethod("get_frequency", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_frequency_3); args = new Type[]{}; method = type.GetMethod("get_loadType", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_loadType_4); args = new Type[]{}; method = type.GetMethod("LoadAudioData", flag, null, args, null); app.RegisterCLRMethodRedirection(method, LoadAudioData_5); args = new Type[]{}; method = type.GetMethod("UnloadAudioData", flag, null, args, null); app.RegisterCLRMethodRedirection(method, UnloadAudioData_6); args = new Type[]{}; method = type.GetMethod("get_preloadAudioData", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_preloadAudioData_7); args = new Type[]{}; method = type.GetMethod("get_ambisonic", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_ambisonic_8); args = new Type[]{}; method = type.GetMethod("get_loadInBackground", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_loadInBackground_9); args = new Type[]{}; method = type.GetMethod("get_loadState", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_loadState_10); args = new Type[]{typeof(System.Single[]), typeof(System.Int32)}; method = type.GetMethod("GetData", flag, null, args, null); app.RegisterCLRMethodRedirection(method, GetData_11); args = new Type[]{typeof(System.Single[]), typeof(System.Int32)}; method = type.GetMethod("SetData", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SetData_12); args = new Type[]{typeof(System.String), typeof(System.Int32), typeof(System.Int32), typeof(System.Int32), typeof(System.Boolean)}; method = type.GetMethod("Create", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Create_13); args = new Type[]{typeof(System.String), typeof(System.Int32), typeof(System.Int32), typeof(System.Int32), typeof(System.Boolean), typeof(UnityEngine.AudioClip.PCMReaderCallback)}; method = type.GetMethod("Create", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Create_14); args = new Type[]{typeof(System.String), typeof(System.Int32), typeof(System.Int32), typeof(System.Int32), typeof(System.Boolean), typeof(UnityEngine.AudioClip.PCMReaderCallback), typeof(UnityEngine.AudioClip.PCMSetPositionCallback)}; method = type.GetMethod("Create", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Create_15); app.RegisterCLRCreateArrayInstance(type, s => new UnityEngine.AudioClip[s]); } static StackObject* get_length_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.length; __ret->ObjectType = ObjectTypes.Float; *(float*)&__ret->Value = result_of_this_method; return __ret + 1; } static StackObject* get_samples_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.samples; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return __ret + 1; } static StackObject* get_channels_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.channels; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return __ret + 1; } static StackObject* get_frequency_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.frequency; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return __ret + 1; } static StackObject* get_loadType_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.loadType; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* LoadAudioData_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.LoadAudioData(); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* UnloadAudioData_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.UnloadAudioData(); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_preloadAudioData_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.preloadAudioData; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_ambisonic_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.ambisonic; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_loadInBackground_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.loadInBackground; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_loadState_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.loadState; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* GetData_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 @offsetSamples = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single[] @data = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.GetData(@data, @offsetSamples); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* SetData_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 @offsetSamples = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single[] @data = (System.Single[])typeof(System.Single[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.AudioClip instance_of_this_method = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.SetData(@data, @offsetSamples); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* Create_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 5); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @stream = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Int32 @frequency = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32 @channels = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @lengthSamples = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.String @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.AudioClip.Create(@name, @lengthSamples, @channels, @frequency, @stream); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Create_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 6); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip.PCMReaderCallback @pcmreadercallback = (UnityEngine.AudioClip.PCMReaderCallback)typeof(UnityEngine.AudioClip.PCMReaderCallback).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Boolean @stream = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32 @frequency = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @channels = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.Int32 @lengthSamples = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 6); System.String @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.AudioClip.Create(@name, @lengthSamples, @channels, @frequency, @stream, @pcmreadercallback); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Create_15(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 7); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AudioClip.PCMSetPositionCallback @pcmsetpositioncallback = (UnityEngine.AudioClip.PCMSetPositionCallback)typeof(UnityEngine.AudioClip.PCMSetPositionCallback).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.AudioClip.PCMReaderCallback @pcmreadercallback = (UnityEngine.AudioClip.PCMReaderCallback)typeof(UnityEngine.AudioClip.PCMReaderCallback).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Boolean @stream = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @frequency = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.Int32 @channels = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 6); System.Int32 @lengthSamples = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 7); System.String @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.AudioClip.Create(@name, @lengthSamples, @channels, @frequency, @stream, @pcmreadercallback, @pcmsetpositioncallback); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }