bool | IsReady[Get] Whether or not the stream is ready for playback |
bool | IsComplete[Get] Whether or not the stream has been completed |
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 |
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. |
float | StreamReadyLength[Get] A getter for the minimum length in seconds required before the OnStreamReady method is called |
OnAddSamples[Get] The callback delegate for stream samples added. | |
OnStreamReady[Get] The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method. | |
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. | |
OnStreamComplete[Get] The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method. |
int | TotalSamples[Get] The maximum known total of samples currently in this stream. |
float | Length[Get] The length of the stream in seconds. |
The constructor that takes in a total channel & sample rate | |
void | RaiseStreamReady ( ) Method that calls OnStreamReady on the main thread |
void | Perform on stream update following ready |
void | Method that calls OnStreamUpdated on the main thread |
void | Method that calls OnStreamComplete on the main thread |
void | AddSamples ( float [] samples ) Adds an array of samples to the current stream |
void | Adds an array of samples to the current stream |
void | SetExpectedSamples ( int expectedSamples ) Calls on occassions where the total samples are known. Either prior to a disk load or following a stream completion. |
void | UpdateState ( ) Calls to determine if completion method should be called |
void | Unload ( ) Called when clip stream should be completely removed from ram |
static float | Calculates length in seconds based on total samples, channels & samples per second |
bool Meta.Voice.Audio.AudioClipStream.IsReady |
---|
Whether or not the stream is ready for playback |
bool Meta.Voice.Audio.AudioClipStream.IsComplete |
---|
Whether or not the stream has been completed |
int Meta.Voice.Audio.AudioClipStream.Channels |
---|
The current number of channels in this audio data stream |
int Meta.Voice.Audio.AudioClipStream.SampleRate |
---|
A getter for the current sample rate of how many samples per second should be played |
int Meta.Voice.Audio.AudioClipStream.AddedSamples |
---|
The total number of samples currently added to this stream. |
int Meta.Voice.Audio.AudioClipStream.ExpectedSamples |
---|
The total number of samples expected from the stream. When streaming, this is not set until the stream is complete. |
float Meta.Voice.Audio.AudioClipStream.StreamReadyLength |
---|
A getter for the minimum length in seconds required before the OnStreamReady method is called |
AudioClipStreamSampleDelegate Meta.Voice.Audio.AudioClipStream.OnAddSamples |
---|
The callback delegate for stream samples added. |
AudioClipStreamDelegate Meta.Voice.Audio.AudioClipStream.OnStreamReady |
---|
The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method. |
AudioClipStreamDelegate Meta.Voice.Audio.AudioClipStream.OnStreamUpdated |
---|
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 Meta.Voice.Audio.AudioClipStream.OnStreamComplete |
---|
The callback delegate for stream completion once SetContentLength is called & all samples have been added via the AddSamples(float[] samples) method. |
int Meta.Voice.Audio.AudioClipStream.TotalSamples |
---|
The maximum known total of samples currently in this stream. |
float Meta.Voice.Audio.AudioClipStream.Length |
---|
The length of the stream in seconds. |
Meta.Voice.Audio.AudioClipStream.AudioClipStream ( 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 newSampleRateThe new sample rate newStreamReadyLengthThe minimum length in seconds required before the OnStreamReady method is called |
virtual void Meta.Voice.Audio.AudioClipStream.RaiseStreamReady ( ) |
---|
Method that calls OnStreamReady on the main thread |
virtual void Meta.Voice.Audio.AudioClipStream.HandleStreamUpdated ( ) |
---|
Perform on stream update following ready |
virtual void Meta.Voice.Audio.AudioClipStream.RaiseStreamUpdated ( ) |
---|
Method that calls OnStreamUpdated on the main thread |
virtual void Meta.Voice.Audio.AudioClipStream.RaiseStreamComplete ( ) |
---|
Method that calls OnStreamComplete on the main thread |
void Meta.Voice.Audio.AudioClipStream.AddSamples ( float [] samples ) |
---|
Adds an array of samples to the current stream Parameters samples A list of decoded floats from 0f to 1f |
virtual void Meta.Voice.Audio.AudioClipStream.AddSamples ( float [] samples, int offset, int length ) |
---|
Adds an array of samples to the current stream Parameters samples A list of decoded floats from 0f to 1f offsetThe index of samples to begin adding from lengthThe total number of samples that should be appended |
virtual void Meta.Voice.Audio.AudioClipStream.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 Meta.Voice.Audio.AudioClipStream.UpdateState ( ) |
---|
Calls to determine if completion method should be called |
virtual void Meta.Voice.Audio.AudioClipStream.Unload ( ) |
---|
Called when clip stream should be completely removed from ram |
static float Meta.Voice.Audio.AudioClipStream.GetLength ( int totalSamples, int channels, int samplesPerSecond ) |
---|
Calculates length in seconds based on total samples, channels & samples per second |