AudioClip | Clip[Get] The audio clip to be used for Unity AudioSource playback |
UnityAudioClipStream ( int newChannels, int newSampleRate, float newStreamReadyLength, float newChunkLength ) Constructor with specific chunk size | |
bool | SetClip ( AudioClip newClip ) Sets an audio clip & disables adding additional samples |
override void | Adds an array of samples to the current stream |
override void | SetExpectedSamples ( int expectedSamples ) Calls on occassions where the total samples are known. Either prior to a disk load or following a stream completion. |
override void | Unload ( ) Called when clip stream should be completely removed from ram |
static void | Method used to preload clips to improve performance at runtime |
static void | Destroy all cached clips |
AudioClip Meta.Voice.Audio.UnityAudioClipStream.Clip |
---|
The audio clip to be used for Unity AudioSource playback |
Meta.Voice.Audio.UnityAudioClipStream.UnityAudioClipStream ( int newChannels, int newSampleRate, float newStreamReadyLength, float newChunkLength ) |
---|
Constructor with specific chunk size Parameters newChannels The audio channels/tracks for the incoming audio data newSampleRateThe sample rate for incoming audio data newStreamReadyLengthThe minimum length in seconds required before the OnStreamReady method is called newChunkSamplesSamples to increase audio clip by |
bool Meta.Voice.Audio.UnityAudioClipStream.SetClip ( AudioClip newClip ) |
---|
Sets an audio clip & disables adding additional samples Parameters newClip Audio clip to be used for playback |
override void Meta.Voice.Audio.UnityAudioClipStream.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 |
override void Meta.Voice.Audio.UnityAudioClipStream.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 |
override void Meta.Voice.Audio.UnityAudioClipStream.Unload ( ) |
---|
Called when clip stream should be completely removed from ram |
static void Meta.Voice.Audio.UnityAudioClipStream.PreloadCachedClips ( int total, int lengthSamples, int channels, int frequency ) |
---|
Method used to preload clips to improve performance at runtime Parameters total Total clips to preload. This should be the number of clips that could be running at once |
static void Meta.Voice.Audio.UnityAudioClipStream.DestroyCachedClips ( ) |
---|
Destroy all cached clips |