Class AudioClip
Assembly: UnityEngine.dll
Syntax
public sealed class AudioClip : Object
Properties
ambisonic
Declaration
public bool ambisonic { get; }
Property Value
channels
Declaration
public int channels { get; }
Property Value
frequency
Declaration
public int frequency { get; }
Property Value
isReadyToPlay
Declaration
[Obsolete("Use AudioClip.loadState instead to get more detailed information about the loading process.")]
public bool isReadyToPlay { get; }
Property Value
length
Declaration
public float length { get; }
Property Value
loadInBackground
Declaration
public bool loadInBackground { get; }
Property Value
loadState
Declaration
public AudioDataLoadState loadState { get; }
Property Value
loadType
Declaration
public AudioClipLoadType loadType { get; }
Property Value
preloadAudioData
Declaration
public bool preloadAudioData { get; }
Property Value
samples
Declaration
public int samples { get; }
Property Value
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
Returns
|
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
Returns
|
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
Returns
|
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
Returns
|
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
Returns
|
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
Returns
GetData(Single[], Int32)
Declaration
public bool GetData(float[] data, int offsetSamples)
Parameters
Type |
Name |
Description |
Single[] |
data |
|
Int32 |
offsetSamples |
|
Returns
LoadAudioData()
Declaration
public bool LoadAudioData()
Returns
SetData(Single[], Int32)
Declaration
public bool SetData(float[] data, int offsetSamples)
Parameters
Type |
Name |
Description |
Single[] |
data |
|
Int32 |
offsetSamples |
|
Returns
UnloadAudioData()
Declaration
public bool UnloadAudioData()
Returns
Extension Methods