Show / Hide Table of Contents

Class AudioClip

Inheritance
Object
Object
AudioClip
Inherited Members
Object.GetInstanceID()
Object.GetHashCode()
Object.Equals(Object)
Object.name
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate(Object, Transform, Boolean)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Instantiate<T>(T, Transform, Boolean)
Object.Destroy(Object, Single)
Object.Destroy(Object)
Object.DestroyImmediate(Object, Boolean)
Object.DestroyImmediate(Object)
Object.FindObjectsOfType(Type)
Object.DontDestroyOnLoad(Object)
Object.hideFlags
Object.DestroyObject(Object, Single)
Object.DestroyObject(Object)
Object.FindSceneObjectsOfType(Type)
Object.FindObjectsOfTypeIncludingAssets(Type)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.FindObjectsOfTypeAll(Type)
Object.FindObjectOfType(Type)
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public sealed class AudioClip : Object

Properties

ambisonic

Declaration
public bool ambisonic { get; }
Property Value
Type Description
Boolean

channels

Declaration
public int channels { get; }
Property Value
Type Description
Int32

frequency

Declaration
public int frequency { get; }
Property Value
Type Description
Int32

isReadyToPlay

Declaration
[Obsolete("Use AudioClip.loadState instead to get more detailed information about the loading process.")]
public bool isReadyToPlay { get; }
Property Value
Type Description
Boolean

length

Declaration
public float length { get; }
Property Value
Type Description
Single

loadInBackground

Declaration
public bool loadInBackground { get; }
Property Value
Type Description
Boolean

loadState

Declaration
public AudioDataLoadState loadState { get; }
Property Value
Type Description
AudioDataLoadState

loadType

Declaration
public AudioClipLoadType loadType { get; }
Property Value
Type Description
AudioClipLoadType

preloadAudioData

Declaration
public bool preloadAudioData { get; }
Property Value
Type Description
Boolean

samples

Declaration
public int samples { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

Create(String, Int32, Int32, Int32, Boolean)

Declaration
public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream)
Parameters
Type Name Description
String name
Int32 lengthSamples
Int32 channels
Int32 frequency
Boolean stream
Returns
Type Description
AudioClip
| Improve this Doc View Source

Create(String, Int32, Int32, Int32, Boolean, Boolean)

Declaration
[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)
Parameters
Type Name Description
String name
Int32 lengthSamples
Int32 channels
Int32 frequency
Boolean _3D
Boolean stream
Returns
Type Description
AudioClip
| Improve this Doc View Source

Create(String, Int32, Int32, Int32, Boolean, Boolean, AudioClip.PCMReaderCallback)

Declaration
[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)
Parameters
Type Name Description
String name
Int32 lengthSamples
Int32 channels
Int32 frequency
Boolean _3D
Boolean stream
AudioClip.PCMReaderCallback pcmreadercallback
Returns
Type Description
AudioClip
| Improve this Doc View Source

Create(String, Int32, Int32, Int32, Boolean, Boolean, AudioClip.PCMReaderCallback, AudioClip.PCMSetPositionCallback)

Declaration
[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)
Parameters
Type Name Description
String name
Int32 lengthSamples
Int32 channels
Int32 frequency
Boolean _3D
Boolean stream
AudioClip.PCMReaderCallback pcmreadercallback
AudioClip.PCMSetPositionCallback pcmsetpositioncallback
Returns
Type Description
AudioClip
| Improve this Doc View Source

Create(String, Int32, Int32, Int32, Boolean, AudioClip.PCMReaderCallback)

Declaration
public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, AudioClip.PCMReaderCallback pcmreadercallback)
Parameters
Type Name Description
String name
Int32 lengthSamples
Int32 channels
Int32 frequency
Boolean stream
AudioClip.PCMReaderCallback pcmreadercallback
Returns
Type Description
AudioClip
| Improve this Doc View Source

Create(String, Int32, Int32, Int32, Boolean, AudioClip.PCMReaderCallback, AudioClip.PCMSetPositionCallback)

Declaration
public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, AudioClip.PCMReaderCallback pcmreadercallback, AudioClip.PCMSetPositionCallback pcmsetpositioncallback)
Parameters
Type Name Description
String name
Int32 lengthSamples
Int32 channels
Int32 frequency
Boolean stream
AudioClip.PCMReaderCallback pcmreadercallback
AudioClip.PCMSetPositionCallback pcmsetpositioncallback
Returns
Type Description
AudioClip

GetData(Single[], Int32)

Declaration
public bool GetData(float[] data, int offsetSamples)
Parameters
Type Name Description
Single[] data
Int32 offsetSamples
Returns
Type Description
Boolean

LoadAudioData()

Declaration
public bool LoadAudioData()
Returns
Type Description
Boolean

SetData(Single[], Int32)

Declaration
public bool SetData(float[] data, int offsetSamples)
Parameters
Type Name Description
Single[] data
Int32 offsetSamples
Returns
Type Description
Boolean

UnloadAudioData()

Declaration
public bool UnloadAudioData()
Returns
Type Description
Boolean

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX