scripts
This commit is contained in:
@@ -0,0 +1,237 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine
|
||||
{
|
||||
// Token: 0x020001D3 RID: 467
|
||||
public sealed class AudioClip : Object
|
||||
{
|
||||
// Token: 0x170007C3 RID: 1987
|
||||
// (get) Token: 0x06002180 RID: 8576
|
||||
public extern float length
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007C4 RID: 1988
|
||||
// (get) Token: 0x06002181 RID: 8577
|
||||
public extern int samples
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007C5 RID: 1989
|
||||
// (get) Token: 0x06002182 RID: 8578
|
||||
public extern int channels
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007C6 RID: 1990
|
||||
// (get) Token: 0x06002183 RID: 8579
|
||||
public extern int frequency
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007C7 RID: 1991
|
||||
// (get) Token: 0x06002184 RID: 8580
|
||||
[Obsolete("Use AudioClip.loadState instead to get more detailed information about the loading process.")]
|
||||
public extern bool isReadyToPlay
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007C8 RID: 1992
|
||||
// (get) Token: 0x06002185 RID: 8581
|
||||
public extern AudioClipLoadType loadType
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06002186 RID: 8582
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public extern bool LoadAudioData();
|
||||
|
||||
// Token: 0x06002187 RID: 8583
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public extern bool UnloadAudioData();
|
||||
|
||||
// Token: 0x170007C9 RID: 1993
|
||||
// (get) Token: 0x06002188 RID: 8584
|
||||
public extern bool preloadAudioData
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007CA RID: 1994
|
||||
// (get) Token: 0x06002189 RID: 8585
|
||||
public extern bool ambisonic
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007CB RID: 1995
|
||||
// (get) Token: 0x0600218A RID: 8586
|
||||
public extern AudioDataLoadState loadState
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170007CC RID: 1996
|
||||
// (get) Token: 0x0600218B RID: 8587
|
||||
public extern bool loadInBackground
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x0600218C RID: 8588
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public extern bool GetData(float[] data, int offsetSamples);
|
||||
|
||||
// Token: 0x0600218D RID: 8589
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public extern bool SetData(float[] data, int offsetSamples);
|
||||
|
||||
// Token: 0x0600218E RID: 8590 RVA: 0x00027D60 File Offset: 0x00025F60
|
||||
[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 AudioClip.Create(name, lengthSamples, channels, frequency, stream);
|
||||
}
|
||||
|
||||
// Token: 0x0600218F RID: 8591 RVA: 0x00027D80 File Offset: 0x00025F80
|
||||
[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, AudioClip.PCMReaderCallback pcmreadercallback)
|
||||
{
|
||||
return AudioClip.Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null);
|
||||
}
|
||||
|
||||
// Token: 0x06002190 RID: 8592 RVA: 0x00027DA4 File Offset: 0x00025FA4
|
||||
[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, AudioClip.PCMReaderCallback pcmreadercallback, AudioClip.PCMSetPositionCallback pcmsetpositioncallback)
|
||||
{
|
||||
return AudioClip.Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, pcmsetpositioncallback);
|
||||
}
|
||||
|
||||
// Token: 0x06002191 RID: 8593 RVA: 0x00027DC8 File Offset: 0x00025FC8
|
||||
public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream)
|
||||
{
|
||||
return AudioClip.Create(name, lengthSamples, channels, frequency, stream, null, null);
|
||||
}
|
||||
|
||||
// Token: 0x06002192 RID: 8594 RVA: 0x00027DEC File Offset: 0x00025FEC
|
||||
public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, AudioClip.PCMReaderCallback pcmreadercallback)
|
||||
{
|
||||
return AudioClip.Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null);
|
||||
}
|
||||
|
||||
// Token: 0x06002193 RID: 8595 RVA: 0x00027E14 File Offset: 0x00026014
|
||||
public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, AudioClip.PCMReaderCallback pcmreadercallback, AudioClip.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 = 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;
|
||||
}
|
||||
|
||||
// Token: 0x14000013 RID: 19
|
||||
// (add) Token: 0x06002194 RID: 8596 RVA: 0x00027E9C File Offset: 0x0002609C
|
||||
// (remove) Token: 0x06002195 RID: 8597 RVA: 0x00027ED4 File Offset: 0x000260D4
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private event AudioClip.PCMReaderCallback m_PCMReaderCallback = null;
|
||||
|
||||
// Token: 0x14000014 RID: 20
|
||||
// (add) Token: 0x06002196 RID: 8598 RVA: 0x00027F0C File Offset: 0x0002610C
|
||||
// (remove) Token: 0x06002197 RID: 8599 RVA: 0x00027F44 File Offset: 0x00026144
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private event AudioClip.PCMSetPositionCallback m_PCMSetPositionCallback = null;
|
||||
|
||||
// Token: 0x06002198 RID: 8600 RVA: 0x00027F7C File Offset: 0x0002617C
|
||||
[RequiredByNativeCode]
|
||||
private void InvokePCMReaderCallback_Internal(float[] data)
|
||||
{
|
||||
if (this.m_PCMReaderCallback != null)
|
||||
{
|
||||
this.m_PCMReaderCallback(data);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002199 RID: 8601 RVA: 0x00027F98 File Offset: 0x00026198
|
||||
[RequiredByNativeCode]
|
||||
private void InvokePCMSetPositionCallback_Internal(int position)
|
||||
{
|
||||
if (this.m_PCMSetPositionCallback != null)
|
||||
{
|
||||
this.m_PCMSetPositionCallback(position);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600219A RID: 8602
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern AudioClip Construct_Internal();
|
||||
|
||||
// Token: 0x0600219B RID: 8603
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void Init_Internal(string name, int lengthSamples, int channels, int frequency, bool stream);
|
||||
|
||||
// Token: 0x020001D4 RID: 468
|
||||
// (Invoke) Token: 0x0600219D RID: 8605
|
||||
public delegate void PCMReaderCallback(float[] data);
|
||||
|
||||
// Token: 0x020001D5 RID: 469
|
||||
// (Invoke) Token: 0x060021A1 RID: 8609
|
||||
public delegate void PCMSetPositionCallback(int position);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user