AudioClip
class in UnityEngine · UnityEngine.AudioModule · inherits from Object
In Tassix
Sound data: decoded samples (WAV, OGG Vorbis, MP3, FLAC) held by the engine's audio scene, or made with Create and SetData.
Properties 10
bool ambisonic { get; }int channels { get; }int frequency { get; }bool isReadyToPlay { get; }float length { get; }bool loadInBackground { get; }AudioDataLoadState loadState { get; }AudioClipLoadType loadType { get; }bool preloadAudioData { get; }int samples { get; }Methods 5
static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream)static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, PCMReaderCallback? pcmreadercallback)static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, PCMReaderCallback? pcmreadercallback, PCMSetPositionCallback? pcmsetpositioncallback)A clip of silence; with a reader callback, filled from it once (streaming plays the same data).
bool GetData(float[] data, int offsetSamples)bool GetData(Span<float> data, int offsetSamples)Interleaved samples from offsetSamples frames, wrapping around the end.
bool LoadAudioData()bool SetData(float[] data, int offsetSamples)bool SetData(ReadOnlySpan<float> data, int offsetSamples)bool UnloadAudioData()Checked against Unity
Conformance scenarios that exercise it, recorded in Unity and compared event by event.