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

AudioStreamHandler Class

Extends DownloadHandlerScript, IVRequestDownloadDecoder, ILogSource
A download handler for UnityWebRequest that decodes audio data and performs audio sample decoded callbacks.

Properties

IVLogger Logger[Get]
Whether data has arrived
Current progress of the download
Whether or not complete
Completion source task
Whether the request was caused by an error
The script being used to decode audio
Callback for audio sample decode

Events

VRequestResponseDelegate OnFirstResponse
VRequestResponseDelegate OnResponse
Callback for download progress

Fields

Quick accessor for audio decoder's will decode in background method. If true, performant but requires multiple buffers. If false, buffers are not required but less performant.

Member Functions

The constructor that generates the decoder and handles routing callbacks
Parameters
audioDecoder
The audio type requested (Wav, MP3, etc.)
onSamplesDecoded
Called on background thread for every chunk of samples decoded.
Dispose ring buffer

Protected Functions

If size is provided, determine if end size is too small for an audio file
Parameters
contentLength
Receive data and push it to the ring buffer
override string GetText ( )
override float GetProgress ( )
override void CompleteContent ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon