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

AddedSamples : int
[Get]
The total number of samples currently added to this stream
Signature
int Meta.Voice.Audio.IAudioClipStream.AddedSamples
Channels : int
[Get]
A getter for the current number of channels in this audio data stream
Signature
int Meta.Voice.Audio.IAudioClipStream.Channels
ExpectedSamples : int
[Get]
The total number of samples expected from the stream. When streaming, this is not set until the stream is complete.
Signature
int Meta.Voice.Audio.IAudioClipStream.ExpectedSamples
IsComplete : bool
[Get]
Whether or not the stream has been completed by receiving the total sample count and applying all samples.
Signature
bool Meta.Voice.Audio.IAudioClipStream.IsComplete
IsReady : bool
[Get]
Whether or not the stream is ready for playback
Signature
bool Meta.Voice.Audio.IAudioClipStream.IsReady
Length : float
[Get]
The known length of the stream in seconds. Typically TotalSamples / (Channels * SampleRate)
Signature
float Meta.Voice.Audio.IAudioClipStream.Length
OnAddSamples : AudioClipStreamSampleDelegate
[Get][Set]
The callback delegate for stream samples added.
Signature
AudioClipStreamSampleDelegate Meta.Voice.Audio.IAudioClipStream.OnAddSamples
OnStreamComplete : AudioClipStreamDelegate
[Get][Set]
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.
Signature
AudioClipStreamDelegate Meta.Voice.Audio.IAudioClipStream.OnStreamComplete
OnStreamReady : AudioClipStreamDelegate
[Get][Set]
The callback delegate for stream ready for playback. This can be set externally but should only be called within the clip stream itself.
Signature
AudioClipStreamDelegate Meta.Voice.Audio.IAudioClipStream.OnStreamReady
OnStreamUnloaded : AudioClipStreamDelegate
[Get][Set]
The callback when the stream has unloaded all data
Signature
AudioClipStreamDelegate Meta.Voice.Audio.IAudioClipStream.OnStreamUnloaded
OnStreamUpdated : AudioClipStreamDelegate
[Get][Set]
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.
Signature
AudioClipStreamDelegate Meta.Voice.Audio.IAudioClipStream.OnStreamUpdated
SampleRate : int
[Get]
A getter for the current sample rate of how many samples per second should be played
Signature
int Meta.Voice.Audio.IAudioClipStream.SampleRate
StreamReadyLength : float
[Get]
A getter for the minimum length in seconds required before the stream is considered ready for playback.
Signature
float Meta.Voice.Audio.IAudioClipStream.StreamReadyLength
TotalSamples : int
[Get]
The maximum known total of samples currently in this stream. Typically Max(AddedSamples, ExpectedSamples)
Signature
int Meta.Voice.Audio.IAudioClipStream.TotalSamples

Methods

AddSamples ( samples , offset , length )
Adds a sample buffer to the current stream in its entirety.
Signature
void Meta.Voice.Audio.IAudioClipStream.AddSamples(float[] samples, int offset, int length)
Parameters
samples: float []  A buffer of decoded floats that were decoded
offset: int  The offset of the buffer to be used
length: int  The total samples to be used
Returns
void
SetExpectedSamples ( expectedSamples )
Calls on occasions where the total samples are known. Either prior to a disk load or following a stream completion.
Signature
void Meta.Voice.Audio.IAudioClipStream.SetExpectedSamples(int expectedSamples)
Parameters
expectedSamples: int  The final number of samples expected to be received
Returns
void
Unload ()
Called when clip stream should be completely removed from RAM
Signature
void Meta.Voice.Audio.IAudioClipStream.Unload()
Returns
void