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

AudioDecoderPcm Class

An audio decoder for raw PCM audio data

Fields

readonly AudioDecoderPcmType PcmType[Get]
All pcm decoding should occur in background due to large amount of data

Member Functions

Constructor that allows selection of pcm type
A method for decoded bytes and calling an AddSample delegate for each
Parameters
buffer
A buffer of bytes to be decoded into audio sample data
bufferOffset
The buffer start offset used for decoding a reused buffer
bufferLength
The total number of bytes to be used from the buffer
onSamplesDecoded
Callback following a sample decode

Static Member Functions

Returns total bytes per sample
Gets pcm sample count from byte content length (1 sample = 2 bytes)
Parameters
contentLength
The provided number of bytes
Decodes an array of pcm data
Parameters
rawData
Raw array of pcm bytes
pcmType
The pcm decode type to be used
Decodes an Int16 sample into a float from 0 to 1
Parameters
rawData
Raw data to be decoded into a single sample
index
Offset of the data
Decodes an Int32 sample into a float from 0 to 1
Parameters
rawData
Raw data to be decoded into a single sample
index
Offset of the data
Decodes an Int64 sample into a float from 0 to 1
Parameters
rawData
Raw data to be decoded into a single sample
index
Offset of the data
Decodes an UInt16 sample into a float from 0 to 1
Parameters
rawData
Raw data to be decoded into a single sample
index
Offset of the data
Decodes an UInt32 sample into a float from 0 to 1
Parameters
rawData
Raw data to be decoded into a single sample
index
Offset of the data
Decodes an UInt64 sample into a float from 0 to 1
Parameters
rawData
Raw data to be decoded into a single sample
index
Offset of the data

Object Data for package-func

Decodes a specific buffer index

Object Data for package-static-func

Returns a decode method depending on the pcm type
Did you find this page helpful?
Thumbs up icon
Thumbs down icon