BufferPoolAudioClipStream
(
newChannels
, newSampleRate
, newReadyLength
, newMaxLength
)
|
Constructor for buffer pool that ensures multiple buffers are preloaded and ready
Signature
Meta.Voice.Audio.BufferPoolAudioClipStream.BufferPoolAudioClipStream(int newChannels, int newSampleRate, float newReadyLength=WitConstants.ENDPOINT_TTS_DEFAULT_READY_LENGTH, float newMaxLength=WitConstants.ENDPOINT_TTS_DEFAULT_MAX_LENGTH) Parameters newChannels: intnewSampleRate: intnewReadyLength: floatnewMaxLength: float |
AddSamples
(
buffer
, bufferOffset
, bufferLength
)
|
Adds a sample buffer to the current stream in its entirety.
Signature
override void Meta.Voice.Audio.BufferPoolAudioClipStream.AddSamples(float[] buffer, int bufferOffset, int bufferLength) Parameters buffer: float []bufferOffset: intbufferLength: intReturns override void |
ReadSamples
(
readOffset
, onReadSamples
)
|
Reads as many samples as possible from the specified read offset
Signature
override int Meta.Voice.Audio.BufferPoolAudioClipStream.ReadSamples(int readOffset, AudioClipStreamSampleDelegate onReadSamples) Parameters readOffset: intonReadSamples: AudioClipStreamSampleDelegateReturns override int |
ReadSamples
(
readOffset
, destinationSamples
, destinationOffset
)
|
Reads as many samples as possible from the specified read offset into the destination with the specified offset
Signature
override int Meta.Voice.Audio.BufferPoolAudioClipStream.ReadSamples(int readOffset, float[] destinationSamples, int destinationOffset=0) Parameters readOffset: intdestinationSamples: float []destinationOffset: intReturns override int |
Unload
()
|
Unload the current samples
Signature
override void Meta.Voice.Audio.BufferPoolAudioClipStream.Unload() Returns override void |
DecrementPool
()
|
Decrement pool when Audio System using it OnEnable
Signature
static void Meta.Voice.Audio.BufferPoolAudioClipStream.DecrementPool() Returns void |
IncrementPool
()
|
Increment pool when Audio System using it OnEnable
Signature
static void Meta.Voice.Audio.BufferPoolAudioClipStream.IncrementPool() Returns void |