using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; using UnityEngine; using UnityEngine.Audio; using UnityEngine.Bindings; using UnityEngine.Internal; using UnityEngine.Playables; using UnityEngine.Scripting; [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")] [assembly: InternalsVisibleTo("Unity.Subsystem.Registration")] [assembly: UnityEngineModuleAssembly] [assembly: InternalsVisibleTo("UnityEngine")] [assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")] [assembly: InternalsVisibleTo("UnityEngine.CoreModule")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")] [assembly: InternalsVisibleTo("UnityEngine")] [assembly: InternalsVisibleTo("UnityEngine.Networking")] [assembly: InternalsVisibleTo("UnityEngine.Cloud")] [assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")] [assembly: InternalsVisibleTo("Unity.Analytics")] [assembly: InternalsVisibleTo("UnityEngine.Analytics")] [assembly: InternalsVisibleTo("UnityEngine.Advertisements")] [assembly: InternalsVisibleTo("UnityEngine.Purchasing")] [assembly: InternalsVisibleTo("UnityEngine.Timeline")] [assembly: InternalsVisibleTo("UnityEngine.TestRunner")] [assembly: InternalsVisibleTo("UnityEngine.GoogleAudioSpatializer")] [assembly: InternalsVisibleTo("Unity.Automation")] [assembly: InternalsVisibleTo("Unity.Burst")] [assembly: InternalsVisibleTo("Unity.Burst.Editor")] [assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")] [assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")] [assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")] [assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")] [assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")] [assembly: InternalsVisibleTo("Unity.RuntimeTests")] [assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")] [assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")] [assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")] [assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")] [assembly: InternalsVisibleTo("Assembly-CSharp-testable")] [assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")] [assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")] [assembly: InternalsVisibleTo("GoogleAR.UnityNative")] [assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")] [assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")] [assembly: InternalsVisibleTo("Unity.IntegrationTests")] [assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")] [assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")] [assembly: InternalsVisibleTo("UnityEngine.ClothModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")] [assembly: InternalsVisibleTo("UnityEngine.VFXModule")] [assembly: InternalsVisibleTo("UnityEngine.VideoModule")] [assembly: InternalsVisibleTo("UnityEngine.WindModule")] [assembly: InternalsVisibleTo("UnityEngine.UIModule")] [assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")] [assembly: InternalsVisibleTo("UnityEngine.UNETModule")] [assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")] [assembly: InternalsVisibleTo("UnityEngine.FileSystemHttpModule")] [assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")] [assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")] [assembly: InternalsVisibleTo("UnityEngine.InputModule")] [assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")] [assembly: InternalsVisibleTo("UnityEngine.TimelineModule")] [assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")] [assembly: InternalsVisibleTo("UnityEngine.XRModule")] [assembly: InternalsVisibleTo("UnityEngine.ARModule")] [assembly: InternalsVisibleTo("UnityEngine.VRModule")] [assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")] [assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")] [assembly: InternalsVisibleTo("UnityEngine.VideoModule")] [assembly: InternalsVisibleTo("UnityEngine.UmbraModule")] [assembly: InternalsVisibleTo("UnityEngine.AnimationModule")] [assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")] [assembly: InternalsVisibleTo("UnityEngine.AIModule")] [assembly: InternalsVisibleTo("UnityEngine.AudioModule")] [assembly: InternalsVisibleTo("UnityEngine.BaselibModule")] [assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")] [assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")] [assembly: InternalsVisibleTo("UnityEngine.DirectorModule")] [assembly: InternalsVisibleTo("UnityEngine.GridModule")] [assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")] [assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")] [assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")] [assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")] [assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")] [assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")] [assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")] [assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")] [assembly: InternalsVisibleTo("UnityEngine.TLSModule")] [assembly: InternalsVisibleTo("UnityEngine.TilemapModule")] [assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")] [assembly: InternalsVisibleTo("UnityEngine.TerrainModule")] [assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")] [assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: InternalsVisibleTo("UnityEngine.StyleSheetsModule")] [assembly: InternalsVisibleTo("UnityEngine.StreamingModule")] [assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace UnityEngine { internal class AudioExtensionDefinition { private string assemblyName; private string extensionNamespace; private string extensionTypeName; private Type extensionType; public AudioExtensionDefinition(AudioExtensionDefinition definition) { assemblyName = definition.assemblyName; extensionNamespace = definition.extensionNamespace; extensionTypeName = definition.extensionTypeName; extensionType = GetExtensionType(); } public AudioExtensionDefinition(string assemblyNameIn, string extensionNamespaceIn, string extensionTypeNameIn) { assemblyName = assemblyNameIn; extensionNamespace = extensionNamespaceIn; extensionTypeName = extensionTypeNameIn; extensionType = GetExtensionType(); } public Type GetExtensionType() { if ((object)extensionType == null) { extensionType = Type.GetType(extensionNamespace + "." + extensionTypeName + ", " + assemblyName); } return extensionType; } } internal class AudioSpatializerExtensionDefinition { public PropertyName spatializerName; public AudioExtensionDefinition definition; public AudioExtensionDefinition editorDefinition; public AudioSpatializerExtensionDefinition(string spatializerNameIn, AudioExtensionDefinition definitionIn, AudioExtensionDefinition editorDefinitionIn) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) spatializerName = PropertyName.op_Implicit(spatializerNameIn); definition = definitionIn; editorDefinition = editorDefinitionIn; } } internal class AudioAmbisonicExtensionDefinition { public PropertyName ambisonicPluginName; public AudioExtensionDefinition definition; public AudioAmbisonicExtensionDefinition(string ambisonicNameIn, AudioExtensionDefinition definitionIn) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ambisonicPluginName = PropertyName.op_Implicit(ambisonicNameIn); definition = definitionIn; } } internal class AudioListenerExtension : ScriptableObject { [SerializeField] private AudioListener m_audioListener; public AudioListener audioListener { get { return m_audioListener; } set { m_audioListener = value; } } public virtual float ReadExtensionProperty(PropertyName propertyName) { return 0f; } public virtual void WriteExtensionProperty(PropertyName propertyName, float propertyValue) { } public virtual void ExtensionUpdate() { } } internal class AudioSourceExtension : ScriptableObject { [SerializeField] private AudioSource m_audioSource; internal int m_ExtensionManagerUpdateIndex = -1; public AudioSource audioSource { get { return m_audioSource; } set { m_audioSource = value; } } public virtual float ReadExtensionProperty(PropertyName propertyName) { return 0f; } public virtual void WriteExtensionProperty(PropertyName propertyName, float propertyValue) { } public virtual void Play() { } public virtual void Stop() { } public virtual void ExtensionUpdate() { } public void OnDestroy() { Stop(); AudioExtensionManager.RemoveExtensionFromManager(this); if ((Object)(object)audioSource != (Object)null) { if ((Object)(object)audioSource.spatializerExtension == (Object)(object)this) { audioSource.spatializerExtension = null; } if ((Object)(object)audioSource.ambisonicExtension == (Object)(object)this) { audioSource.ambisonicExtension = null; } } } } internal sealed class AudioExtensionManager { private static List m_ListenerSpatializerExtensionDefinitions = new List(); private static List m_SourceSpatializerExtensionDefinitions = new List(); private static List m_SourceAmbisonicDecoderExtensionDefinitions = new List(); private static List m_SourceExtensionsToUpdate = new List(); private static int m_NextStopIndex = 0; private static bool m_BuiltinDefinitionsRegistered = false; private static PropertyName m_SpatializerName = PropertyName.op_Implicit(0); private static PropertyName m_SpatializerExtensionName = PropertyName.op_Implicit(0); private static PropertyName m_ListenerSpatializerExtensionName = PropertyName.op_Implicit(0); internal static bool IsListenerSpatializerExtensionRegistered() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition listenerSpatializerExtensionDefinition in m_ListenerSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == listenerSpatializerExtensionDefinition.spatializerName) { return true; } } return false; } internal static bool IsSourceSpatializerExtensionRegistered() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition sourceSpatializerExtensionDefinition in m_SourceSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == sourceSpatializerExtensionDefinition.spatializerName) { return true; } } return false; } internal static bool IsSourceAmbisonicDecoderExtensionRegistered() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioAmbisonicExtensionDefinition sourceAmbisonicDecoderExtensionDefinition in m_SourceAmbisonicDecoderExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetAmbisonicDecoderPluginName()) == sourceAmbisonicDecoderExtensionDefinition.ambisonicPluginName) { return true; } } return false; } internal static AudioSourceExtension AddSpatializerExtension(AudioSource source) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (!source.spatialize) { return null; } if ((Object)(object)source.spatializerExtension != (Object)null) { return source.spatializerExtension; } RegisterBuiltinDefinitions(); foreach (AudioSpatializerExtensionDefinition sourceSpatializerExtensionDefinition in m_SourceSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == sourceSpatializerExtensionDefinition.spatializerName) { AudioSourceExtension audioSourceExtension = source.AddSpatializerExtension(sourceSpatializerExtensionDefinition.definition.GetExtensionType()); if ((Object)(object)audioSourceExtension != (Object)null) { audioSourceExtension.audioSource = source; source.spatializerExtension = audioSourceExtension; WriteExtensionProperties(audioSourceExtension, sourceSpatializerExtensionDefinition.definition.GetExtensionType().Name); return audioSourceExtension; } } } return null; } internal static AudioSourceExtension AddAmbisonicDecoderExtension(AudioSource source) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)source.ambisonicExtension != (Object)null) { return source.ambisonicExtension; } RegisterBuiltinDefinitions(); foreach (AudioAmbisonicExtensionDefinition sourceAmbisonicDecoderExtensionDefinition in m_SourceAmbisonicDecoderExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetAmbisonicDecoderPluginName()) == sourceAmbisonicDecoderExtensionDefinition.ambisonicPluginName) { AudioSourceExtension audioSourceExtension = source.AddAmbisonicExtension(sourceAmbisonicDecoderExtensionDefinition.definition.GetExtensionType()); if ((Object)(object)audioSourceExtension != (Object)null) { audioSourceExtension.audioSource = source; source.ambisonicExtension = audioSourceExtension; return audioSourceExtension; } } } return null; } internal static void WriteExtensionProperties(AudioSourceExtension extension, string extensionName) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (m_SpatializerExtensionName == PropertyName.op_Implicit(0)) { m_SpatializerExtensionName = PropertyName.op_Implicit(extensionName); } for (int i = 0; i < extension.audioSource.GetNumExtensionProperties(); i++) { if (extension.audioSource.ReadExtensionName(i) == m_SpatializerExtensionName) { PropertyName propertyName = extension.audioSource.ReadExtensionPropertyName(i); float propertyValue = extension.audioSource.ReadExtensionPropertyValue(i); extension.WriteExtensionProperty(propertyName, propertyValue); } } extension.audioSource.ClearExtensionProperties(m_SpatializerExtensionName); } internal static AudioListenerExtension AddSpatializerExtension(AudioListener listener) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)listener.spatializerExtension != (Object)null) { return listener.spatializerExtension; } RegisterBuiltinDefinitions(); foreach (AudioSpatializerExtensionDefinition listenerSpatializerExtensionDefinition in m_ListenerSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == listenerSpatializerExtensionDefinition.spatializerName || PropertyName.op_Implicit(AudioSettings.GetAmbisonicDecoderPluginName()) == listenerSpatializerExtensionDefinition.spatializerName) { AudioListenerExtension audioListenerExtension = listener.AddExtension(listenerSpatializerExtensionDefinition.definition.GetExtensionType()); if ((Object)(object)audioListenerExtension != (Object)null) { audioListenerExtension.audioListener = listener; listener.spatializerExtension = audioListenerExtension; WriteExtensionProperties(audioListenerExtension, listenerSpatializerExtensionDefinition.definition.GetExtensionType().Name); return audioListenerExtension; } } } return null; } internal static void WriteExtensionProperties(AudioListenerExtension extension, string extensionName) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (m_ListenerSpatializerExtensionName == PropertyName.op_Implicit(0)) { m_ListenerSpatializerExtensionName = PropertyName.op_Implicit(extensionName); } for (int i = 0; i < extension.audioListener.GetNumExtensionProperties(); i++) { if (extension.audioListener.ReadExtensionName(i) == m_ListenerSpatializerExtensionName) { PropertyName propertyName = extension.audioListener.ReadExtensionPropertyName(i); float propertyValue = extension.audioListener.ReadExtensionPropertyValue(i); extension.WriteExtensionProperty(propertyName, propertyValue); } } extension.audioListener.ClearExtensionProperties(m_ListenerSpatializerExtensionName); } internal static AudioListenerExtension GetSpatializerExtension(AudioListener listener) { if ((Object)(object)listener.spatializerExtension != (Object)null) { return listener.spatializerExtension; } return null; } internal static AudioSourceExtension GetSpatializerExtension(AudioSource source) { return (!source.spatialize) ? null : source.spatializerExtension; } internal static AudioSourceExtension GetAmbisonicExtension(AudioSource source) { return source.ambisonicExtension; } internal static Type GetListenerSpatializerExtensionType() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition listenerSpatializerExtensionDefinition in m_ListenerSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == listenerSpatializerExtensionDefinition.spatializerName) { return listenerSpatializerExtensionDefinition.definition.GetExtensionType(); } } return null; } internal static Type GetListenerSpatializerExtensionEditorType() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition listenerSpatializerExtensionDefinition in m_ListenerSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == listenerSpatializerExtensionDefinition.spatializerName) { return listenerSpatializerExtensionDefinition.editorDefinition.GetExtensionType(); } } return null; } internal static Type GetSourceSpatializerExtensionType() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition sourceSpatializerExtensionDefinition in m_SourceSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == sourceSpatializerExtensionDefinition.spatializerName) { return sourceSpatializerExtensionDefinition.definition.GetExtensionType(); } } return null; } internal static Type GetSourceSpatializerExtensionEditorType() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition sourceSpatializerExtensionDefinition in m_SourceSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetSpatializerPluginName()) == sourceSpatializerExtensionDefinition.spatializerName) { return sourceSpatializerExtensionDefinition.editorDefinition.GetExtensionType(); } } return null; } internal static Type GetSourceAmbisonicExtensionType() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) foreach (AudioAmbisonicExtensionDefinition sourceAmbisonicDecoderExtensionDefinition in m_SourceAmbisonicDecoderExtensionDefinitions) { if (PropertyName.op_Implicit(AudioSettings.GetAmbisonicDecoderPluginName()) == sourceAmbisonicDecoderExtensionDefinition.ambisonicPluginName) { return sourceAmbisonicDecoderExtensionDefinition.definition.GetExtensionType(); } } return null; } internal static PropertyName GetSpatializerName() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return m_SpatializerName; } internal static PropertyName GetSourceSpatializerExtensionName() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return m_SpatializerExtensionName; } internal static PropertyName GetListenerSpatializerExtensionName() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return m_ListenerSpatializerExtensionName; } internal static void AddExtensionToManager(AudioSourceExtension extension) { RegisterBuiltinDefinitions(); if (extension.m_ExtensionManagerUpdateIndex == -1) { m_SourceExtensionsToUpdate.Add(extension); extension.m_ExtensionManagerUpdateIndex = m_SourceExtensionsToUpdate.Count - 1; } } internal static void RemoveExtensionFromManager(AudioSourceExtension extension) { int extensionManagerUpdateIndex = extension.m_ExtensionManagerUpdateIndex; if (extensionManagerUpdateIndex >= 0 && extensionManagerUpdateIndex < m_SourceExtensionsToUpdate.Count) { int index = m_SourceExtensionsToUpdate.Count - 1; m_SourceExtensionsToUpdate[extensionManagerUpdateIndex] = m_SourceExtensionsToUpdate[index]; m_SourceExtensionsToUpdate[extensionManagerUpdateIndex].m_ExtensionManagerUpdateIndex = extensionManagerUpdateIndex; m_SourceExtensionsToUpdate.RemoveAt(index); } extension.m_ExtensionManagerUpdateIndex = -1; } internal static void Update() { RegisterBuiltinDefinitions(); AudioListener audioListener = GetAudioListener() as AudioListener; if ((Object)(object)audioListener != (Object)null) { AudioListenerExtension audioListenerExtension = AddSpatializerExtension(audioListener); if ((Object)(object)audioListenerExtension != (Object)null) { audioListenerExtension.ExtensionUpdate(); } } for (int i = 0; i < m_SourceExtensionsToUpdate.Count; i++) { m_SourceExtensionsToUpdate[i].ExtensionUpdate(); } m_NextStopIndex = ((m_NextStopIndex < m_SourceExtensionsToUpdate.Count) ? m_NextStopIndex : 0); int num = ((m_SourceExtensionsToUpdate.Count > 0) ? (1 + m_SourceExtensionsToUpdate.Count / 8) : 0); for (int j = 0; j < num; j++) { AudioSourceExtension audioSourceExtension = m_SourceExtensionsToUpdate[m_NextStopIndex]; if ((Object)(object)audioSourceExtension.audioSource == (Object)null || !((Behaviour)audioSourceExtension.audioSource).enabled || !audioSourceExtension.audioSource.isPlaying) { audioSourceExtension.Stop(); RemoveExtensionFromManager(audioSourceExtension); } else { m_NextStopIndex++; m_NextStopIndex = ((m_NextStopIndex < m_SourceExtensionsToUpdate.Count) ? m_NextStopIndex : 0); } } } internal static void GetReadyToPlay(AudioSourceExtension extension) { if ((Object)(object)extension != (Object)null) { extension.Play(); AddExtensionToManager(extension); } } private static void RegisterBuiltinDefinitions() { bool flag = false; if (!m_BuiltinDefinitionsRegistered) { if (flag || AudioSettings.GetSpatializerPluginName() == "GVR Audio Spatializer") { } if (flag || AudioSettings.GetAmbisonicDecoderPluginName() == "GVR Audio Spatializer") { } m_BuiltinDefinitionsRegistered = true; } } private static bool RegisterListenerSpatializerDefinition(string spatializerName, AudioExtensionDefinition extensionDefinition, AudioExtensionDefinition editorDefinition) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition listenerSpatializerExtensionDefinition in m_ListenerSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(spatializerName) == listenerSpatializerExtensionDefinition.spatializerName) { Debug.Log((object)string.Concat("RegisterListenerSpatializerDefinition failed for ", extensionDefinition.GetExtensionType(), ". We only allow one audio listener extension to be registered for each spatializer.")); return false; } } AudioSpatializerExtensionDefinition item = new AudioSpatializerExtensionDefinition(spatializerName, extensionDefinition, editorDefinition); m_ListenerSpatializerExtensionDefinitions.Add(item); return true; } private static bool RegisterSourceSpatializerDefinition(string spatializerName, AudioExtensionDefinition extensionDefinition, AudioExtensionDefinition editorDefinition) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) foreach (AudioSpatializerExtensionDefinition sourceSpatializerExtensionDefinition in m_SourceSpatializerExtensionDefinitions) { if (PropertyName.op_Implicit(spatializerName) == sourceSpatializerExtensionDefinition.spatializerName) { Debug.Log((object)string.Concat("RegisterSourceSpatializerDefinition failed for ", extensionDefinition.GetExtensionType(), ". We only allow one audio source extension to be registered for each spatializer.")); return false; } } AudioSpatializerExtensionDefinition item = new AudioSpatializerExtensionDefinition(spatializerName, extensionDefinition, editorDefinition); m_SourceSpatializerExtensionDefinitions.Add(item); return true; } private static bool RegisterSourceAmbisonicDefinition(string ambisonicDecoderName, AudioExtensionDefinition extensionDefinition) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) foreach (AudioAmbisonicExtensionDefinition sourceAmbisonicDecoderExtensionDefinition in m_SourceAmbisonicDecoderExtensionDefinitions) { if (PropertyName.op_Implicit(ambisonicDecoderName) == sourceAmbisonicDecoderExtensionDefinition.ambisonicPluginName) { Debug.Log((object)string.Concat("RegisterSourceAmbisonicDefinition failed for ", extensionDefinition.GetExtensionType(), ". We only allow one audio source extension to be registered for each ambisonic decoder.")); return false; } } AudioAmbisonicExtensionDefinition item = new AudioAmbisonicExtensionDefinition(ambisonicDecoderName, extensionDefinition); m_SourceAmbisonicDecoderExtensionDefinitions.Add(item); return true; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] internal static extern Object GetAudioListener(); } } namespace UnityEngine.Audio { [RequiredByNativeCode] [StaticAccessor(/*Could not decode attribute arguments.*/)] [NativeHeader("Modules/Audio/Public/Director/AudioPlayableOutput.h")] [NativeHeader("Modules/Audio/Public/ScriptBindings/AudioPlayableOutput.bindings.h")] [NativeHeader("Modules/Audio/Public/AudioSource.h")] public struct AudioPlayableOutput : IPlayableOutput { private PlayableOutputHandle m_Handle; public static AudioPlayableOutput Null => new AudioPlayableOutput(PlayableOutputHandle.Null); internal AudioPlayableOutput(PlayableOutputHandle handle) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (((PlayableOutputHandle)(ref handle)).IsValid() && !((PlayableOutputHandle)(ref handle)).IsPlayableOutputOfType()) { throw new InvalidCastException("Can't set handle: the playable is not an AudioPlayableOutput."); } m_Handle = handle; } public static AudioPlayableOutput Create(PlayableGraph graph, string name, AudioSource target) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!AudioPlayableGraphExtensions.InternalCreateAudioOutput(ref graph, name, out var handle)) { return Null; } AudioPlayableOutput result = new AudioPlayableOutput(handle); result.SetTarget(target); return result; } public PlayableOutputHandle GetHandle() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return m_Handle; } public static implicit operator PlayableOutput(AudioPlayableOutput output) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return new PlayableOutput(output.GetHandle()); } public static explicit operator AudioPlayableOutput(PlayableOutput output) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return new AudioPlayableOutput(((PlayableOutput)(ref output)).GetHandle()); } public AudioSource GetTarget() { return InternalGetTarget(ref m_Handle); } public void SetTarget(AudioSource value) { InternalSetTarget(ref m_Handle, value); } public bool GetEvaluateOnSeek() { return InternalGetEvaluateOnSeek(ref m_Handle); } public void SetEvaluateOnSeek(bool value) { InternalSetEvaluateOnSeek(ref m_Handle, value); } [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern AudioSource InternalGetTarget(ref PlayableOutputHandle output); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern void InternalSetTarget(ref PlayableOutputHandle output, AudioSource target); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern bool InternalGetEvaluateOnSeek(ref PlayableOutputHandle output); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern void InternalSetEvaluateOnSeek(ref PlayableOutputHandle output, bool value); } [NativeHeader("Runtime/Director/Core/HPlayable.h")] [RequiredByNativeCode] [NativeHeader("Modules/Audio/Public/Director/AudioClipPlayable.h")] [NativeHeader("Modules/Audio/Public/ScriptBindings/AudioClipPlayable.bindings.h")] [StaticAccessor(/*Could not decode attribute arguments.*/)] public struct AudioClipPlayable : IPlayable, IEquatable { private PlayableHandle m_Handle; internal AudioClipPlayable(PlayableHandle handle) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType()) { throw new InvalidCastException("Can't set handle: the playable is not an AudioClipPlayable."); } m_Handle = handle; } public static AudioClipPlayable Create(PlayableGraph graph, AudioClip clip, bool looping) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) PlayableHandle handle = CreateHandle(graph, clip, looping); AudioClipPlayable audioClipPlayable = new AudioClipPlayable(handle); if ((Object)(object)clip != (Object)null) { PlayableExtensions.SetDuration(audioClipPlayable, (double)clip.length); } return audioClipPlayable; } private static PlayableHandle CreateHandle(PlayableGraph graph, AudioClip clip, bool looping) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) PlayableHandle handle = PlayableHandle.Null; if (!InternalCreateAudioClipPlayable(ref graph, clip, looping, ref handle)) { return PlayableHandle.Null; } return handle; } public PlayableHandle GetHandle() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return m_Handle; } public static implicit operator Playable(AudioClipPlayable playable) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return new Playable(playable.GetHandle()); } public static explicit operator AudioClipPlayable(Playable playable) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return new AudioClipPlayable(((Playable)(ref playable)).GetHandle()); } public bool Equals(AudioClipPlayable other) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) return GetHandle() == other.GetHandle(); } public AudioClip GetClip() { return GetClipInternal(ref m_Handle); } public void SetClip(AudioClip value) { SetClipInternal(ref m_Handle, value); } public bool GetLooped() { return GetLoopedInternal(ref m_Handle); } public void SetLooped(bool value) { SetLoopedInternal(ref m_Handle, value); } [Obsolete("IsPlaying() has been deprecated. Use IsChannelPlaying() instead (UnityUpgradable) -> IsChannelPlaying()", true)] [EditorBrowsable(EditorBrowsableState.Never)] public bool IsPlaying() { return IsChannelPlaying(); } public bool IsChannelPlaying() { return GetIsChannelPlayingInternal(ref m_Handle); } public double GetStartDelay() { return GetStartDelayInternal(ref m_Handle); } internal void SetStartDelay(double value) { SetStartDelayInternal(ref m_Handle, value); } public double GetPauseDelay() { return GetPauseDelayInternal(ref m_Handle); } internal void GetPauseDelay(double value) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 double pauseDelayInternal = GetPauseDelayInternal(ref m_Handle); if ((int)((PlayableHandle)(ref m_Handle)).GetPlayState() == 1 && (value < 0.05 || (pauseDelayInternal != 0.0 && pauseDelayInternal < 0.05))) { throw new ArgumentException("AudioClipPlayable.pauseDelay: Setting new delay when existing delay is too small or 0.0 (" + pauseDelayInternal + "), audio system will not be able to change in time"); } SetPauseDelayInternal(ref m_Handle, value); } public void Seek(double startTime, double startDelay) { Seek(startTime, startDelay, 0.0); } public void Seek(double startTime, double startDelay, [DefaultValue("0")] double duration) { SetStartDelayInternal(ref m_Handle, startDelay); if (duration > 0.0) { ((PlayableHandle)(ref m_Handle)).SetDuration(duration + startTime); SetPauseDelayInternal(ref m_Handle, startDelay + duration); } else { ((PlayableHandle)(ref m_Handle)).SetDuration(double.MaxValue); SetPauseDelayInternal(ref m_Handle, 0.0); } ((PlayableHandle)(ref m_Handle)).SetTime(startTime); ((PlayableHandle)(ref m_Handle)).Play(); } [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern AudioClip GetClipInternal(ref PlayableHandle hdl); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern void SetClipInternal(ref PlayableHandle hdl, AudioClip clip); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern bool GetLoopedInternal(ref PlayableHandle hdl); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern void SetLoopedInternal(ref PlayableHandle hdl, bool looped); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern bool GetIsChannelPlayingInternal(ref PlayableHandle hdl); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern double GetStartDelayInternal(ref PlayableHandle hdl); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern void SetStartDelayInternal(ref PlayableHandle hdl, double delay); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern double GetPauseDelayInternal(ref PlayableHandle hdl); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern void SetPauseDelayInternal(ref PlayableHandle hdl, double delay); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern bool InternalCreateAudioClipPlayable(ref PlayableGraph graph, AudioClip clip, bool looping, ref PlayableHandle handle); [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern bool ValidateType(ref PlayableHandle hdl); } [StaticAccessor(/*Could not decode attribute arguments.*/)] [RequiredByNativeCode] [NativeHeader("Runtime/Director/Core/HPlayable.h")] [NativeHeader("Modules/Audio/Public/Director/AudioMixerPlayable.h")] [NativeHeader("Modules/Audio/Public/ScriptBindings/AudioMixerPlayable.bindings.h")] public struct AudioMixerPlayable : IPlayable, IEquatable { private PlayableHandle m_Handle; internal AudioMixerPlayable(PlayableHandle handle) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (((PlayableHandle)(ref handle)).IsValid() && !((PlayableHandle)(ref handle)).IsPlayableOfType()) { throw new InvalidCastException("Can't set handle: the playable is not an AudioMixerPlayable."); } m_Handle = handle; } public static AudioMixerPlayable Create(PlayableGraph graph, int inputCount = 0, bool normalizeInputVolumes = false) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) PlayableHandle handle = CreateHandle(graph, inputCount, normalizeInputVolumes); return new AudioMixerPlayable(handle); } private static PlayableHandle CreateHandle(PlayableGraph graph, int inputCount, bool normalizeInputVolumes) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) PlayableHandle handle = PlayableHandle.Null; if (!CreateAudioMixerPlayableInternal(ref graph, inputCount, normalizeInputVolumes, ref handle)) { return PlayableHandle.Null; } return handle; } public PlayableHandle GetHandle() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return m_Handle; } public static implicit operator Playable(AudioMixerPlayable playable) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return new Playable(playable.GetHandle()); } public static explicit operator AudioMixerPlayable(Playable playable) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return new AudioMixerPlayable(((Playable)(ref playable)).GetHandle()); } public bool Equals(AudioMixerPlayable other) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) return GetHandle() == other.GetHandle(); } [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] private static extern bool CreateAudioMixerPlayableInternal(ref PlayableGraph graph, int inputCount, bool normalizeInputVolumes, ref PlayableHandle handle); } [NativeHeader("Runtime/Director/Core/HPlayableOutput.h")] [NativeHeader("Modules/Audio/Public/ScriptBindings/AudioPlayableGraphExtensions.bindings.h")] [StaticAccessor(/*Could not decode attribute arguments.*/)] internal static class AudioPlayableGraphExtensions { [MethodImpl(MethodImplOptions.InternalCall)] [NativeThrows] internal static extern bool InternalCreateAudioOutput(ref PlayableGraph graph, string name, out PlayableOutputHandle handle); } } namespace UnityEngine { [NativeType(Header = "Modules/Audio/Public/ScriptBindings/AudioRenderer.bindings.h")] public class AudioRenderer { public static bool Start() { return Internal_AudioRenderer_Start(); } public static bool Stop() { return Internal_AudioRenderer_Stop(); } public static int GetSampleCountForCaptureFrame() { return Internal_AudioRenderer_GetSampleCountForCaptureFrame(); } internal unsafe static bool AddMixerGroupSink(AudioMixerGroup mixerGroup, NativeArray buffer, bool excludeFromMix) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return Internal_AudioRenderer_AddMixerGroupSink(mixerGroup, NativeArrayUnsafeUtility.GetUnsafePtr(buffer), buffer.Length, excludeFromMix); } public unsafe static bool Render(NativeArray buffer) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Internal_AudioRenderer_Render(NativeArrayUnsafeUtility.GetUnsafePtr(buffer), buffer.Length); } [MethodImpl(MethodImplOptions.InternalCall)] internal static extern bool Internal_AudioRenderer_Start(); [MethodImpl(MethodImplOptions.InternalCall)] internal static extern bool Internal_AudioRenderer_Stop(); [MethodImpl(MethodImplOptions.InternalCall)] internal static extern int Internal_AudioRenderer_GetSampleCountForCaptureFrame(); [MethodImpl(MethodImplOptions.InternalCall)] internal unsafe static extern bool Internal_AudioRenderer_AddMixerGroupSink(AudioMixerGroup mixerGroup, void* ptr, int length, bool excludeFromMix); [MethodImpl(MethodImplOptions.InternalCall)] internal unsafe static extern bool Internal_AudioRenderer_Render(void* ptr, int length); } } namespace UnityEngine.Experimental.Audio { [NativeType(Header = "Modules/Audio/Public/ScriptBindings/AudioSampleProvider.bindings.h")] [StaticAccessor(/*Could not decode attribute arguments.*/)] public class AudioSampleProvider : IDisposable { [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate uint ConsumeSampleFramesNativeFunction(uint providerId, IntPtr interleavedSampleFrames, uint sampleFrameCount); public delegate void SampleFramesHandler(AudioSampleProvider provider, uint sampleFrameCount); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void SampleFramesEventNativeFunction(IntPtr userData, uint providerId, uint sampleFrameCount); private ConsumeSampleFramesNativeFunction m_ConsumeSampleFramesNativeFunction; public uint id { get; private set; } public ushort trackIndex { get; private set; } public Object owner { get; private set; } public bool valid => InternalIsValid(id); public ushort channelCount { get; private set; } public uint sampleRate { get; private set; } public uint maxSampleFrameCount => InternalGetMaxSampleFrameCount(id); public uint availableSampleFrameCount => InternalGetAvailableSampleFrameCount(id); public uint freeSampleFrameCount => InternalGetFreeSampleFrameCount(id); public uint freeSampleFrameCountLowThreshold { get { return InternalGetFreeSampleFrameCountLowThreshold(id); } set { InternalSetFreeSampleFrameCountLowThreshold(id, value); } } public bool enableSampleFramesAvailableEvents { get { return InternalGetEnableSampleFramesAvailableEvents(id); } set { InternalSetEnableSampleFramesAvailableEvents(id, value); } } public bool enableSilencePadding { get { return InternalGetEnableSilencePadding(id); } set { InternalSetEnableSilencePadding(id, value); } } public static ConsumeSampleFramesNativeFunction consumeSampleFramesNativeFunction => (ConsumeSampleFramesNativeFunction)Marshal.GetDelegateForFunctionPointer(InternalGetConsumeSampleFramesNativeFunctionPtr(), typeof(ConsumeSampleFramesNativeFunction)); public event SampleFramesHandler sampleFramesAvailable; public event SampleFramesHandler sampleFramesOverflow; private AudioSampleProvider(uint providerId, Object ownerObj, ushort trackIdx) { owner = ownerObj; id = providerId; trackIndex = trackIdx; m_ConsumeSampleFramesNativeFunction = (ConsumeSampleFramesNativeFunction)Marshal.GetDelegateForFunctionPointer(InternalGetConsumeSampleFramesNativeFunctionPtr(), typeof(ConsumeSampleFramesNativeFunction)); ushort chCount = 0; uint sRate = 0u; InternalGetFormatInfo(providerId, out chCount, out sRate); channelCount = chCount; sampleRate = sRate; InternalSetScriptingPtr(providerId, this); } [VisibleToOtherModules] internal static AudioSampleProvider Lookup(uint providerId, Object ownerObj, ushort trackIndex) { AudioSampleProvider audioSampleProvider = InternalGetScriptingPtr(providerId); if (audioSampleProvider != null || !InternalIsValid(providerId)) { return audioSampleProvider; } return new AudioSampleProvider(providerId, ownerObj, trackIndex); } ~AudioSampleProvider() { Dispose(); } public void Dispose() { if (id != 0) { InternalSetScriptingPtr(id, null); id = 0u; } GC.SuppressFinalize(this); } public unsafe uint ConsumeSampleFrames(NativeArray sampleFrames) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (channelCount == 0) { return 0u; } return m_ConsumeSampleFramesNativeFunction(id, (IntPtr)NativeArrayUnsafeUtility.GetUnsafePtr(sampleFrames), (uint)sampleFrames.Length / (uint)channelCount); } public void SetSampleFramesAvailableNativeHandler(SampleFramesEventNativeFunction handler, IntPtr userData) { InternalSetSampleFramesAvailableNativeHandler(id, Marshal.GetFunctionPointerForDelegate((Delegate)handler), userData); } public void ClearSampleFramesAvailableNativeHandler() { InternalClearSampleFramesAvailableNativeHandler(id); } public void SetSampleFramesOverflowNativeHandler(SampleFramesEventNativeFunction handler, IntPtr userData) { InternalSetSampleFramesOverflowNativeHandler(id, Marshal.GetFunctionPointerForDelegate((Delegate)handler), userData); } public void ClearSampleFramesOverflowNativeHandler() { InternalClearSampleFramesOverflowNativeHandler(id); } [RequiredByNativeCode] private void InvokeSampleFramesAvailable(int sampleFrameCount) { if (this.sampleFramesAvailable != null) { this.sampleFramesAvailable(this, (uint)sampleFrameCount); } } [RequiredByNativeCode] private void InvokeSampleFramesOverflow(int droppedSampleFrameCount) { if (this.sampleFramesOverflow != null) { this.sampleFramesOverflow(this, (uint)droppedSampleFrameCount); } } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalGetFormatInfo(uint providerId, out ushort chCount, out uint sRate); [MethodImpl(MethodImplOptions.InternalCall)] private static extern AudioSampleProvider InternalGetScriptingPtr(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern void InternalSetScriptingPtr(uint providerId, AudioSampleProvider provider); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern bool InternalIsValid(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern uint InternalGetMaxSampleFrameCount(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern uint InternalGetAvailableSampleFrameCount(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern uint InternalGetFreeSampleFrameCount(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern uint InternalGetFreeSampleFrameCountLowThreshold(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern void InternalSetFreeSampleFrameCountLowThreshold(uint providerId, uint sampleFrameCount); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern bool InternalGetEnableSampleFramesAvailableEvents(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern void InternalSetEnableSampleFramesAvailableEvents(uint providerId, bool enable); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalSetSampleFramesAvailableNativeHandler(uint providerId, IntPtr handler, IntPtr userData); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalClearSampleFramesAvailableNativeHandler(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalSetSampleFramesOverflowNativeHandler(uint providerId, IntPtr handler, IntPtr userData); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalClearSampleFramesOverflowNativeHandler(uint providerId); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern bool InternalGetEnableSilencePadding(uint id); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern void InternalSetEnableSilencePadding(uint id, bool enabled); [MethodImpl(MethodImplOptions.InternalCall)] [NativeMethod(IsThreadSafe = true)] private static extern IntPtr InternalGetConsumeSampleFramesNativeFunctionPtr(); } } namespace UnityEngine.Audio { public static class AudioPlayableBinding { public static PlayableBinding Create(string name, Object key) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) return PlayableBinding.CreateInternal(name, key, typeof(AudioSource), new CreateOutputMethod(CreateAudioOutput)); } private static PlayableOutput CreateAudioOutput(PlayableGraph graph, string name) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return AudioPlayableOutput.Create(graph, name, null); } } } namespace UnityEngine { public enum WebCamFlags { FrontFacing = 1, AutoFocusPointSupported } public enum WebCamKind { WideAngle = 1, Telephoto, ColorAndDepth } [UsedByNativeCode] public struct WebCamDevice { internal string m_Name; internal string m_DepthCameraName; internal int m_Flags; internal WebCamKind m_Kind; internal Resolution[] m_Resolutions; public string name => m_Name; public bool isFrontFacing => (m_Flags & 1) != 0; public WebCamKind kind => m_Kind; public string depthCameraName => (!(m_DepthCameraName == "")) ? m_DepthCameraName : null; public bool isAutoFocusPointSupported => (m_Flags & 2) != 0; public Resolution[] availableResolutions => m_Resolutions; } [NativeHeader("Runtime/Video/BaseWebCamTexture.h")] public sealed class WebCamTexture : Texture { public Vector2? autoFocusPoint { get { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) return (!(internalAutoFocusPoint.x < 0f)) ? new Vector2?(internalAutoFocusPoint) : null; } set { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) internalAutoFocusPoint = (Vector2)(value.HasValue ? value.Value : new Vector2(-1f, -1f)); } } internal Vector2 internalAutoFocusPoint { get { //IL_0008: Unknown result type (might be due to invalid IL or missing references) get_internalAutoFocusPoint_Injected(out var ret); return ret; } set { set_internalAutoFocusPoint_Injected(ref value); } } public extern bool isDepth { [MethodImpl(MethodImplOptions.InternalCall)] get; } public extern bool isPlaying { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern string deviceName { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float requestedFPS { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int requestedWidth { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int requestedHeight { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public static extern WebCamDevice[] devices { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern int videoRotationAngle { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool videoVerticallyMirrored { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool didUpdateThisFrame { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public WebCamTexture(string deviceName, int requestedWidth, int requestedHeight, int requestedFPS) { Internal_CreateWebCamTexture(this, deviceName, requestedWidth, requestedHeight, requestedFPS); } public WebCamTexture(string deviceName, int requestedWidth, int requestedHeight) { Internal_CreateWebCamTexture(this, deviceName, requestedWidth, requestedHeight, 0); } public WebCamTexture(string deviceName) { Internal_CreateWebCamTexture(this, deviceName, 0, 0, 0); } public WebCamTexture(int requestedWidth, int requestedHeight, int requestedFPS) { Internal_CreateWebCamTexture(this, "", requestedWidth, requestedHeight, requestedFPS); } public WebCamTexture(int requestedWidth, int requestedHeight) { Internal_CreateWebCamTexture(this, "", requestedWidth, requestedHeight, 0); } public WebCamTexture() { Internal_CreateWebCamTexture(this, "", 0, 0, 0); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void Internal_CreateWebCamTexture([Writable] WebCamTexture self, string scriptingDevice, int requestedWidth, int requestedHeight, int maxFramerate); public void Play() { INTERNAL_CALL_Play(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Play(WebCamTexture self); public void Pause() { INTERNAL_CALL_Pause(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Pause(WebCamTexture self); public void Stop() { INTERNAL_CALL_Stop(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Stop(WebCamTexture self); public Color GetPixel(int x, int y) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) INTERNAL_CALL_GetPixel(this, x, y, out var value); return value; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_GetPixel(WebCamTexture self, int x, int y, out Color value); public Color[] GetPixels() { return GetPixels(0, 0, ((Texture)this).width, ((Texture)this).height); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern Color[] GetPixels(int x, int y, int blockWidth, int blockHeight); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern Color32[] GetPixels32([DefaultValue("null")] Color32[] colors); [ExcludeFromDocs] public Color32[] GetPixels32() { Color32[] colors = null; return GetPixels32(colors); } [MethodImpl(MethodImplOptions.InternalCall)] [SpecialName] private extern void get_internalAutoFocusPoint_Injected(out Vector2 ret); [MethodImpl(MethodImplOptions.InternalCall)] [SpecialName] private extern void set_internalAutoFocusPoint_Injected(ref Vector2 value); } public enum AudioSpeakerMode { Raw, Mono, Stereo, Quad, Surround, Mode5point1, Mode7point1, Prologic } public enum AudioDataLoadState { Unloaded, Loading, Loaded, Failed } public struct AudioConfiguration { public AudioSpeakerMode speakerMode; public int dspBufferSize; public int sampleRate; public int numRealVoices; public int numVirtualVoices; } public sealed class AudioSettings { public delegate void AudioConfigurationChangeHandler(bool deviceWasChanged); public static extern AudioSpeakerMode driverCapabilities { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public static extern AudioSpeakerMode speakerMode { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } internal static extern int profilerCaptureFlags { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } [ThreadAndSerializationSafe] public static extern double dspTime { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public static extern int outputSampleRate { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } internal static extern bool unityAudioDisabled { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public static event AudioConfigurationChangeHandler OnAudioConfigurationChanged; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public static extern void GetDSPBufferSize(out int bufferLength, out int numBuffers); [MethodImpl(MethodImplOptions.InternalCall)] [Obsolete("AudioSettings.SetDSPBufferSize is deprecated and has been replaced by audio project settings and the AudioSettings.GetConfiguration/AudioSettings.Reset API.")] [GeneratedByOldBindingsGenerator] public static extern void SetDSPBufferSize(int bufferLength, int numBuffers); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public static extern string GetSpatializerPluginName(); public static AudioConfiguration GetConfiguration() { INTERNAL_CALL_GetConfiguration(out var value); return value; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_GetConfiguration(out AudioConfiguration value); public static bool Reset(AudioConfiguration config) { return INTERNAL_CALL_Reset(ref config); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern bool INTERNAL_CALL_Reset(ref AudioConfiguration config); [RequiredByNativeCode] internal static void InvokeOnAudioConfigurationChanged(bool deviceWasChanged) { if (AudioSettings.OnAudioConfigurationChanged != null) { AudioSettings.OnAudioConfigurationChanged(deviceWasChanged); } } [RequiredByNativeCode] internal static void InvokeOnAudioManagerUpdate() { AudioExtensionManager.Update(); } [RequiredByNativeCode] internal static void InvokeOnAudioSourcePlay(AudioSource source) { AudioSourceExtension audioSourceExtension = AudioExtensionManager.AddSpatializerExtension(source); if ((Object)(object)audioSourceExtension != (Object)null) { AudioExtensionManager.GetReadyToPlay(audioSourceExtension); } if ((Object)(object)source.clip != (Object)null && source.clip.ambisonic) { AudioSourceExtension audioSourceExtension2 = AudioExtensionManager.AddAmbisonicDecoderExtension(source); if ((Object)(object)audioSourceExtension2 != (Object)null) { AudioExtensionManager.GetReadyToPlay(audioSourceExtension2); } } } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] internal static extern string GetAmbisonicDecoderPluginName(); } public enum AudioCompressionFormat { PCM, Vorbis, ADPCM, MP3, VAG, HEVAG, XMA, AAC, GCADPCM, ATRAC9 } public enum AudioClipLoadType { DecompressOnLoad, CompressedInMemory, Streaming } public sealed class AudioClip : Object { public delegate void PCMReaderCallback(float[] data); public delegate void PCMSetPositionCallback(int position); public extern float length { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern int samples { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern int channels { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern int frequency { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } [Obsolete("Use AudioClip.loadState instead to get more detailed information about the loading process.")] public extern bool isReadyToPlay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern AudioClipLoadType loadType { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool preloadAudioData { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool ambisonic { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern AudioDataLoadState loadState { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool loadInBackground { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } private event PCMReaderCallback m_PCMReaderCallback = null; private event PCMSetPositionCallback m_PCMSetPositionCallback = null; private AudioClip() { } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool LoadAudioData(); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool UnloadAudioData(); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool GetData(float[] data, int offsetSamples); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool SetData(float[] data, int offsetSamples); [Obsolete("The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.")] public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream) { return Create(name, lengthSamples, channels, frequency, stream); } [Obsolete("The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.")] public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream, PCMReaderCallback pcmreadercallback) { return Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null); } [Obsolete("The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.")] public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream, PCMReaderCallback pcmreadercallback, PCMSetPositionCallback pcmsetpositioncallback) { return Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, pcmsetpositioncallback); } public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream) { return Create(name, lengthSamples, channels, frequency, stream, null, null); } public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, PCMReaderCallback pcmreadercallback) { return Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null); } public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, PCMReaderCallback pcmreadercallback, PCMSetPositionCallback pcmsetpositioncallback) { if (name == null) { throw new NullReferenceException(); } if (lengthSamples <= 0) { throw new ArgumentException("Length of created clip must be larger than 0"); } if (channels <= 0) { throw new ArgumentException("Number of channels in created clip must be greater than 0"); } if (frequency <= 0) { throw new ArgumentException("Frequency in created clip must be greater than 0"); } AudioClip audioClip = Construct_Internal(); if (pcmreadercallback != null) { audioClip.m_PCMReaderCallback += pcmreadercallback; } if (pcmsetpositioncallback != null) { audioClip.m_PCMSetPositionCallback += pcmsetpositioncallback; } audioClip.Init_Internal(name, lengthSamples, channels, frequency, stream); return audioClip; } [RequiredByNativeCode] private void InvokePCMReaderCallback_Internal(float[] data) { if (this.m_PCMReaderCallback != null) { this.m_PCMReaderCallback(data); } } [RequiredByNativeCode] private void InvokePCMSetPositionCallback_Internal(int position) { if (this.m_PCMSetPositionCallback != null) { this.m_PCMSetPositionCallback(position); } } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern AudioClip Construct_Internal(); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private extern void Init_Internal(string name, int lengthSamples, int channels, int frequency, bool stream); } public enum AudioVelocityUpdateMode { Auto, Fixed, Dynamic } public class AudioBehaviour : Behaviour { } [RequireComponent(typeof(Transform))] public sealed class AudioListener : AudioBehaviour { internal AudioListenerExtension spatializerExtension = null; public static extern float volume { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public static extern bool pause { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AudioVelocityUpdateMode velocityUpdateMode { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void GetOutputDataHelper(float[] samples, int channel); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void GetSpectrumDataHelper(float[] samples, int channel, FFTWindow window); [Obsolete("GetOutputData returning a float[] is deprecated, use GetOutputData and pass a pre allocated array instead.")] public static float[] GetOutputData(int numSamples, int channel) { float[] array = new float[numSamples]; GetOutputDataHelper(array, channel); return array; } public static void GetOutputData(float[] samples, int channel) { GetOutputDataHelper(samples, channel); } [Obsolete("GetSpectrumData returning a float[] is deprecated, use GetOutputData and pass a pre allocated array instead.")] public static float[] GetSpectrumData(int numSamples, int channel, FFTWindow window) { float[] array = new float[numSamples]; GetSpectrumDataHelper(array, channel, window); return array; } public static void GetSpectrumData(float[] samples, int channel, FFTWindow window) { GetSpectrumDataHelper(samples, channel, window); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] internal extern int GetNumExtensionProperties(); internal int GetNumExtensionPropertiesForThisExtension(PropertyName extensionName) { return INTERNAL_CALL_GetNumExtensionPropertiesForThisExtension(this, ref extensionName); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern int INTERNAL_CALL_GetNumExtensionPropertiesForThisExtension(AudioListener self, ref PropertyName extensionName); internal PropertyName ReadExtensionName(int listenerIndex) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) INTERNAL_CALL_ReadExtensionName(this, listenerIndex, out var value); return value; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_ReadExtensionName(AudioListener self, int listenerIndex, out PropertyName value); internal PropertyName ReadExtensionPropertyName(int listenerIndex) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) INTERNAL_CALL_ReadExtensionPropertyName(this, listenerIndex, out var value); return value; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_ReadExtensionPropertyName(AudioListener self, int listenerIndex, out PropertyName value); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] internal extern float ReadExtensionPropertyValue(int listenerIndex); internal bool ReadExtensionProperty(PropertyName extensionName, PropertyName propertyName, ref float propertyValue) { return INTERNAL_CALL_ReadExtensionProperty(this, ref extensionName, ref propertyName, ref propertyValue); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern bool INTERNAL_CALL_ReadExtensionProperty(AudioListener self, ref PropertyName extensionName, ref PropertyName propertyName, ref float propertyValue); internal void ClearExtensionProperties(PropertyName extensionName) { INTERNAL_CALL_ClearExtensionProperties(this, ref extensionName); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_ClearExtensionProperties(AudioListener self, ref PropertyName extensionName); internal AudioListenerExtension AddExtension(Type extensionType) { if ((Object)(object)spatializerExtension == (Object)null) { spatializerExtension = ScriptableObject.CreateInstance(extensionType) as AudioListenerExtension; } return spatializerExtension; } } public enum FFTWindow { Rectangular, Triangle, Hamming, Hanning, Blackman, BlackmanHarris } public enum AudioRolloffMode { Logarithmic, Linear, Custom } public enum AudioSourceCurveType { CustomRolloff, SpatialBlend, ReverbZoneMix, Spread } [RequireComponent(typeof(Transform))] public sealed class AudioSource : AudioBehaviour { internal AudioSourceExtension spatializerExtension = null; internal AudioSourceExtension ambisonicExtension = null; public extern float volume { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float pitch { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float time { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [ThreadAndSerializationSafe] public extern int timeSamples { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [ThreadAndSerializationSafe] public extern AudioClip clip { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AudioMixerGroup outputAudioMixerGroup { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool isPlaying { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool isVirtual { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool loop { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool ignoreListenerVolume { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool playOnAwake { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool ignoreListenerPause { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AudioVelocityUpdateMode velocityUpdateMode { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float panStereo { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float spatialBlend { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } internal extern bool spatializeInternal { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public bool spatialize { get { return spatializeInternal; } set { if (spatializeInternal == value) { return; } spatializeInternal = value; if (value) { AudioSourceExtension audioSourceExtension = AudioExtensionManager.AddSpatializerExtension(this); if ((Object)(object)audioSourceExtension != (Object)null && isPlaying) { AudioExtensionManager.GetReadyToPlay(audioSourceExtension); } } } } public extern bool spatializePostEffects { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reverbZoneMix { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool bypassEffects { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool bypassListenerEffects { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool bypassReverbZones { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float dopplerLevel { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float spread { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int priority { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool mute { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float minDistance { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float maxDistance { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AudioRolloffMode rolloffMode { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [Obsolete("minVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.", true)] public extern float minVolume { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [Obsolete("maxVolume is not supported anymore. Use min-, maxDistance and rolloffMode instead.", true)] public extern float maxVolume { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [Obsolete("rolloffFactor is not supported anymore. Use min-, maxDistance and rolloffMode instead.", true)] public extern float rolloffFactor { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void Play([DefaultValue("0")] ulong delay); [ExcludeFromDocs] public void Play() { ulong delay = 0uL; Play(delay); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void PlayDelayed(float delay); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void PlayScheduled(double time); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void SetScheduledStartTime(double time); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void SetScheduledEndTime(double time); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void Stop(); public void Pause() { INTERNAL_CALL_Pause(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Pause(AudioSource self); public void UnPause() { INTERNAL_CALL_UnPause(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_UnPause(AudioSource self); [ExcludeFromDocs] public void PlayOneShot(AudioClip clip) { float volumeScale = 1f; PlayOneShot(clip, volumeScale); } public void PlayOneShot(AudioClip clip, [DefaultValue("1.0F")] float volumeScale) { if ((Object)(object)clip != (Object)null && clip.ambisonic) { AudioSourceExtension audioSourceExtension = AudioExtensionManager.AddAmbisonicDecoderExtension(this); if ((Object)(object)audioSourceExtension != (Object)null) { AudioExtensionManager.GetReadyToPlay(audioSourceExtension); } } PlayOneShotHelper(clip, volumeScale); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private extern void PlayOneShotHelper(AudioClip clip, [DefaultValue("1.0F")] float volumeScale); [ExcludeFromDocs] private void PlayOneShotHelper(AudioClip clip) { float volumeScale = 1f; PlayOneShotHelper(clip, volumeScale); } [ExcludeFromDocs] public static void PlayClipAtPoint(AudioClip clip, Vector3 position) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) float num = 1f; PlayClipAtPoint(clip, position, num); } public static void PlayClipAtPoint(AudioClip clip, Vector3 position, [DefaultValue("1.0F")] float volume) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("One shot audio"); val.transform.position = position; AudioSource audioSource = (AudioSource)(object)val.AddComponent(typeof(AudioSource)); audioSource.clip = clip; audioSource.spatialBlend = 1f; audioSource.volume = volume; audioSource.Play(); Object.Destroy((Object)(object)val, clip.length * ((!(Time.timeScale < 0.01f)) ? Time.timeScale : 0.01f)); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void SetCustomCurve(AudioSourceCurveType type, AnimationCurve curve); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern AnimationCurve GetCustomCurve(AudioSourceCurveType type); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private extern void GetOutputDataHelper(float[] samples, int channel); [Obsolete("GetOutputData return a float[] is deprecated, use GetOutputData passing a pre allocated array instead.")] public float[] GetOutputData(int numSamples, int channel) { float[] array = new float[numSamples]; GetOutputDataHelper(array, channel); return array; } public void GetOutputData(float[] samples, int channel) { GetOutputDataHelper(samples, channel); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private extern void GetSpectrumDataHelper(float[] samples, int channel, FFTWindow window); [Obsolete("GetSpectrumData returning a float[] is deprecated, use GetSpectrumData passing a pre allocated array instead.")] public float[] GetSpectrumData(int numSamples, int channel, FFTWindow window) { float[] array = new float[numSamples]; GetSpectrumDataHelper(array, channel, window); return array; } public void GetSpectrumData(float[] samples, int channel, FFTWindow window) { GetSpectrumDataHelper(samples, channel, window); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] internal extern int GetNumExtensionProperties(); internal int GetNumExtensionPropertiesForThisExtension(PropertyName extensionName) { return INTERNAL_CALL_GetNumExtensionPropertiesForThisExtension(this, ref extensionName); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern int INTERNAL_CALL_GetNumExtensionPropertiesForThisExtension(AudioSource self, ref PropertyName extensionName); internal PropertyName ReadExtensionName(int sourceIndex) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) INTERNAL_CALL_ReadExtensionName(this, sourceIndex, out var value); return value; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_ReadExtensionName(AudioSource self, int sourceIndex, out PropertyName value); internal PropertyName ReadExtensionPropertyName(int sourceIndex) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) INTERNAL_CALL_ReadExtensionPropertyName(this, sourceIndex, out var value); return value; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_ReadExtensionPropertyName(AudioSource self, int sourceIndex, out PropertyName value); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] internal extern float ReadExtensionPropertyValue(int sourceIndex); internal bool ReadExtensionProperty(PropertyName extensionName, PropertyName propertyName, ref float propertyValue) { return INTERNAL_CALL_ReadExtensionProperty(this, ref extensionName, ref propertyName, ref propertyValue); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern bool INTERNAL_CALL_ReadExtensionProperty(AudioSource self, ref PropertyName extensionName, ref PropertyName propertyName, ref float propertyValue); internal void ClearExtensionProperties(PropertyName extensionName) { INTERNAL_CALL_ClearExtensionProperties(this, ref extensionName); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_ClearExtensionProperties(AudioSource self, ref PropertyName extensionName); internal AudioSourceExtension AddSpatializerExtension(Type extensionType) { if ((Object)(object)spatializerExtension == (Object)null) { spatializerExtension = ScriptableObject.CreateInstance(extensionType) as AudioSourceExtension; } return spatializerExtension; } internal AudioSourceExtension AddAmbisonicExtension(Type extensionType) { if ((Object)(object)ambisonicExtension == (Object)null) { ambisonicExtension = ScriptableObject.CreateInstance(extensionType) as AudioSourceExtension; } return ambisonicExtension; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool SetSpatializerFloat(int index, float value); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool GetSpatializerFloat(int index, out float value); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool SetAmbisonicDecoderFloat(int index, float value); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool GetAmbisonicDecoderFloat(int index, out float value); } public enum AudioReverbPreset { Off, Generic, PaddedCell, Room, Bathroom, Livingroom, Stoneroom, Auditorium, Concerthall, Cave, Arena, Hangar, CarpetedHallway, Hallway, StoneCorridor, Alley, Forest, City, Mountains, Quarry, Plain, ParkingLot, SewerPipe, Underwater, Drugged, Dizzy, Psychotic, User } [RequireComponent(typeof(Transform))] public sealed class AudioReverbZone : Behaviour { public extern float minDistance { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float maxDistance { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AudioReverbPreset reverbPreset { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int room { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int roomHF { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int roomLF { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float decayTime { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float decayHFRatio { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int reflections { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reflectionsDelay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern int reverb { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reverbDelay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float HFReference { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float LFReference { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [Obsolete("roomRolloffFactor is no longer supported.")] public float roomRolloffFactor { get { return 10f; } set { } } public extern float diffusion { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float density { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } [RequireComponent(typeof(AudioBehaviour))] public sealed class AudioLowPassFilter : Behaviour { public extern float cutoffFrequency { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AnimationCurve customCutoffCurve { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float lowpassResonanceQ { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } [RequireComponent(typeof(AudioBehaviour))] public sealed class AudioHighPassFilter : Behaviour { public extern float cutoffFrequency { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float highpassResonanceQ { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } [RequireComponent(typeof(AudioBehaviour))] public sealed class AudioDistortionFilter : Behaviour { public extern float distortionLevel { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } [RequireComponent(typeof(AudioBehaviour))] public sealed class AudioEchoFilter : Behaviour { public extern float delay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float decayRatio { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float dryMix { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float wetMix { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } [RequireComponent(typeof(AudioBehaviour))] public sealed class AudioChorusFilter : Behaviour { public extern float dryMix { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float wetMix1 { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float wetMix2 { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float wetMix3 { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float delay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float rate { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float depth { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [Obsolete("feedback is deprecated, this property does nothing.")] public extern float feedback { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } [RequireComponent(typeof(AudioBehaviour))] public sealed class AudioReverbFilter : Behaviour { public extern AudioReverbPreset reverbPreset { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float dryLevel { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float room { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float roomHF { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } [Obsolete("roomRolloffFactor is no longer supported.")] public float roomRolloffFactor { get { return 10f; } set { } } public extern float decayTime { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float decayHFRatio { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reflectionsLevel { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reflectionsDelay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reverbLevel { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float reverbDelay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float diffusion { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float density { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float hfReference { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float roomLF { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern float lfReference { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } } public sealed class Microphone { public static extern string[] devices { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public static extern AudioClip Start(string deviceName, bool loop, int lengthSec, int frequency); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public static extern void End(string deviceName); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public static extern bool IsRecording(string deviceName); [MethodImpl(MethodImplOptions.InternalCall)] [ThreadAndSerializationSafe] [GeneratedByOldBindingsGenerator] public static extern int GetPosition(string deviceName); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public static extern void GetDeviceCaps(string deviceName, out int minFreq, out int maxFreq); } } namespace UnityEngine.Audio { public enum AudioMixerUpdateMode { Normal, UnscaledTime } [ExcludeFromPreset] [ExcludeFromObjectFactory] public class AudioMixer : Object { public extern AudioMixerGroup outputAudioMixerGroup { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern AudioMixerUpdateMode updateMode { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } internal AudioMixer() { } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern AudioMixerGroup[] FindMatchingGroups(string subPath); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern AudioMixerSnapshot FindSnapshot(string name); private void TransitionToSnapshot(AudioMixerSnapshot snapshot, float timeToReach) { if ((Object)(object)snapshot == (Object)null) { throw new ArgumentException("null Snapshot passed to AudioMixer.TransitionToSnapshot of AudioMixer '" + ((Object)this).name + "'"); } if ((Object)(object)snapshot.audioMixer != (Object)(object)this) { throw new ArgumentException("Snapshot '" + ((Object)snapshot).name + "' passed to AudioMixer.TransitionToSnapshot is not a snapshot from AudioMixer '" + ((Object)this).name + "'"); } snapshot.TransitionTo(timeToReach); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void TransitionToSnapshots(AudioMixerSnapshot[] snapshots, float[] weights, float timeToReach); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool SetFloat(string name, float value); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool ClearFloat(string name); [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern bool GetFloat(string name, out float value); } public class AudioMixerSnapshot : Object, ISubAssetNotDuplicatable { public extern AudioMixer audioMixer { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } internal AudioMixerSnapshot() { } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] public extern void TransitionTo(float timeToReach); } public class AudioMixerGroup : Object, ISubAssetNotDuplicatable { public extern AudioMixer audioMixer { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } internal AudioMixerGroup() { } } } namespace UnityEngine { [ExcludeFromPreset] [Obsolete("MovieTexture is deprecated. Use VideoPlayer instead.", false)] [ExcludeFromObjectFactory] public sealed class MovieTexture : Texture { public extern AudioClip audioClip { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool loop { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] set; } public extern bool isPlaying { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern bool isReadyToPlay { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } public extern float duration { [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] get; } private MovieTexture() { } public void Play() { INTERNAL_CALL_Play(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Play(MovieTexture self); public void Stop() { INTERNAL_CALL_Stop(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Stop(MovieTexture self); public void Pause() { INTERNAL_CALL_Pause(this); } [MethodImpl(MethodImplOptions.InternalCall)] [GeneratedByOldBindingsGenerator] private static extern void INTERNAL_CALL_Pause(MovieTexture self); } }