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

AudioDecoderJson Class

A decoder for json data and audio within a single data stream. Decodes the data into split audio and text streams

Fields

Once setup this should display the number of channels expected to be decoded
Once setup this should display the number of samples per second expected
Due to headers, sequential decode is required

Member Functions

Constructor that takes in an audio decoder and decode callback delegate
Parameters
audioDecoder
The audio decoder to receive
onJsonDecoded
The delegate to be called every time a json chunk is decoded
Performs an audio decode setup with specified channels and sample rate
Parameters
channels
Channels supported by audio file
sampleRate
Sample rate supported by audio file
Cannot determine total samples via content length alone
Performs a decode of full chunk data
Parameters
chunkData
A chunk of bytes to be decoded into audio data
chunkStart
The array start index into account when decoding
chunkLength
The total number of bytes to be used within chunkData
Returns
Returns an array of audio data floats that range from 0 to 1
Did you find this page helpful?
Thumbs up icon
Thumbs down icon