Why Meta Quest?
Design
Develop
API reference
Distribute and grow
Blog
Support
API reference
API reference
Select your platform
No SDKs available
No versions available
Overview
AudioClipAudioSource
ImageViewer
Lib
Meta
Conduit
Net
Voice
Voice
AboutWindow
Audio
Audio
AudioClipSettings
BaseAudioClipStream
BaseAudioPlayer
BaseAudioSystem
Decoding
IAudioClipProvider
IAudioClipSetter
IAudioClipStream
IAudioPlayer
IAudioSourceProvider
IAudioSystem
RawAudioClipStream
UnityAudioPlayer
UnityAudioSystem
Hub
INLPRequestOptions
INLPRequestResponseDecoder
INLPRequestResults
ITranscriptionRequestOptions
ITranscriptionRequestResults
IVoiceRequestOptions
IVoiceRequestResults
Logging
NLPRequest
NLPRequestEvents
NLPRequestResponseEvent
NLPRequestResponseValidatorEvent
NLayer
Net
Samples
TelemetryUtilities
TranscriptionRequest
TranscriptionRequestEvent
TranscriptionRequestEvents
UnityOpus
VSDKHub
VoiceRequest
VoiceRequestEvents
Windows
WitAi
Oculus
Code samples
Downloads
Release notes
Supported platforms
Meta
BaseAudioClipStream Class
Extends
IAudioClipStream
A simple abstract class that can be used to simplify the code required for a custom
IAudioClipStream
Properties
int
Channels
[Get]
The current number of channels in this audio data stream
int
SampleRate
[Get]
A getter for the current sample rate of how many samples per second should be played
float
StreamReadyLength
[Get]
A getter for the minimum length in seconds required before the OnStreamReady method is called
bool
IsReady
[Get]
Whether or not the stream is ready for playback
bool
IsComplete
[Get]
Whether or not the stream has been completed
int
AddedSamples
[Get]
The total number of samples currently added to this stream.
int
ExpectedSamples
[Get]
The total number of samples expected from the stream. When streaming, this is not set until the stream is complete.
AudioClipStreamSampleDelegate
OnAddSamples
[Get]
The callback delegate for stream samples added.
AudioClipStreamDelegate
OnStreamReady
[Get]
The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method.
AudioClipStreamDelegate
OnStreamUpdated
[Get]
The callback delegate for stream update if any additional data such as the AudioClip is expected to update mid stream. This can be set externally but should only be called within the clip stream itself.
AudioClipStreamDelegate
OnStreamComplete
[Get]
The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method.
AudioClipStreamDelegate
OnStreamUnloaded
[Get]
The callback when the stream has unloaded all data
Fields
int
TotalSamples
[Get]
The maximum known total of samples currently in this stream.
float
Length
[Get]
The length of the stream in seconds.
Protected Functions
BaseAudioClipStream
( int newChannels,
int newSampleRate,
float newStreamReadyLength )
The constructor that takes in a total channel & sample rate
Parameters
newChannels
The channels to be used for streaming
newSampleRate
The new sample rate
newStreamReadyLength
The minimum length in seconds required before the OnStreamReady method is called
virtual void
Reset
( )
Method for clearing all data
virtual bool
IsEnoughBuffered
( )
A check if the clip stream has buffered enough to be considered ready
virtual void
RaiseStreamReady
( )
Method that calls OnStreamReady on the main thread
virtual void
HandleStreamUpdated
( )
Perform on stream update following ready
virtual void
RaiseStreamUpdated
( )
Method that calls OnStreamUpdated on the main thread
virtual void
RaiseStreamComplete
( )
Method that calls OnStreamComplete on the main thread
Member Functions
abstract void
AddSamples
( float [] samples,
int offset,
int length )
Adds a sample buffer to the current stream in its entirety.
Parameters
samples
A buffer of decoded floats that were decoded
offset
The offset of the buffer to be used
length
The total samples to be used
virtual void
SetExpectedSamples
( int expectedSamples )
Calls on occassions where the total samples are known. Either prior to a disk load or following a stream completion.
Parameters
expectedSamples
The final number of samples expected to be received
virtual void
UpdateState
( )
Calls to determine if completion method should be called
virtual void
Unload
( )
Called when clip stream should clear ram and ready for re-use
Static Member Functions
static float
GetLength
( int totalSamples,
int channels,
int samplesPerSecond )
Calculates length in seconds based on total samples, channels & samples per second
Build with Meta
Social Technologies
Meta Horizon
AI
Worlds
About us
Careers
Research
Products
Virtual reality / Meta Horizon
Developer Blog
Download SDKs
Meta for Work
Programs
Start
Meta Horizon Creator Program
Discover
Why Meta Quest?
What is mixed reality?
Platforms and tools
2D apps for Meta Horizon OS
Devices
Meta Avatars
Success stories
Use cases
Support and legal
Developer policies
Legal
Privacy
Forums
Support
Build with Meta
Social Technologies
Meta Horizon
AI
Worlds
About us
Careers
Research
Products
Virtual reality / Meta Horizon
Developer Blog
Download SDKs
Meta for Work
Programs
Start
Meta Horizon Creator Program
Discover
Why Meta Quest?
What is mixed reality?
Platforms and tools
2D apps for Meta Horizon OS
Devices
Meta Avatars
Success stories
Use cases
Support and legal
Developer policies
Legal
Privacy
Forums
Support
Build with Meta
Social Technologies
Meta Horizon
AI
Worlds
About us
Careers
Research
Products
Virtual reality / Meta Horizon
Developer Blog
Download SDKs
Meta for Work
Programs
Start
Meta Horizon Creator Program
Discover
Why Meta Quest?
What is mixed reality?
Platforms and tools
2D apps for Meta Horizon OS
Devices
Meta Avatars
Success stories
Use cases
Support and legal
Developer policies
Legal
Privacy
Forums
Support
English (US)
© 2026 Meta