API reference
API reference
Select your platform
No SDKs available
No versions available

IAudioClipStream Interface

An interface to be used for audio clip streams. Samples added to this stream are always decoded to 0f - 1f.

Properties

Whether or not the stream is ready for playback
Whether or not the stream has been completed by receiving the total sample count and applying all samples.
A getter for the current number of channels in this audio data stream
A getter for the current sample rate of how many samples per second should be played
The total number of samples currently added to this stream
The total number of samples expected from the stream. When streaming, this is not set until the stream is complete.
The maximum known total of samples currently in this stream. Typically Max(AddedSamples, ExpectedSamples)
The known length of the stream in seconds. Typically TotalSamples / (Channels * SampleRate)
A getter for the minimum length in seconds required before the stream is considered ready for playback.
The callback delegate for stream samples added.
The callback delegate for stream ready for playback. This can be set externally but should only be called within the clip stream itself.
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.
The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method. This can be set externally but should only be called within the clip stream itself.
The callback when the stream has unloaded all data

Member Functions

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
Calls on occasions 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
Called when clip stream should be completely removed from RAM
Did you find this page helpful?
Thumbs up icon
Thumbs down icon