API reference

AudioDecoderPcm Class

An audio decoder for raw PCM audio data

Fields

RequireSequentialDecode : bool
PCM can be decoded in any order prior to merging back in
Signature
bool Meta.Voice.Audio.Decoding.AudioDecoderPcm.RequireSequentialDecode

Properties

Channels : int
[Get]
Once setup this should display the number of channels expected to be decoded
Signature
int Meta.Voice.Audio.Decoding.AudioDecoderPcm.Channels
SampleRate : int
[Get]
Once setup this should display the number of samples per second expected
Signature
int Meta.Voice.Audio.Decoding.AudioDecoderPcm.SampleRate

Methods

Decode ( chunkData , chunkStart , chunkLength )
A method for returning decoded bytes into audio data
Signature
float [] Meta.Voice.Audio.Decoding.AudioDecoderPcm.Decode(byte[] chunkData, int chunkStart, int chunkLength)
Parameters
chunkData: byte []  A chunk of bytes to be decoded into audio data
chunkStart: int  The array start index into account when decoding
chunkLength: int  The total number of bytes to be used within chunkData
Returns
float []  Returns an array of audio data from 0-1
GetTotalSamples ( contentLength )
Gets pcm sample count from byte content length (1 sample = 2 bytes)
Signature
int Meta.Voice.Audio.Decoding.AudioDecoderPcm.GetTotalSamples(ulong contentLength)
Parameters
contentLength: ulong  The provided number of bytes
Returns
int
Setup ( channels , sampleRate )
Initial setup of the decoder
Signature
void Meta.Voice.Audio.Decoding.AudioDecoderPcm.Setup(int channels, int sampleRate)
Parameters
channels: int  Total channels of audio data
sampleRate: int  The rate of audio data received
Returns
void

Static Methods

DecodePCM16 ( rawData )
Signature
static float [] Meta.Voice.Audio.Decoding.AudioDecoderPcm.DecodePCM16(byte[] rawData)
Parameters
rawData: byte []
Returns
float []
DecodeSamplePCM16 ( rawData , index )
Signature
static float Meta.Voice.Audio.Decoding.AudioDecoderPcm.DecodeSamplePCM16(byte[] rawData, int index)
Parameters
rawData: byte []
index: int
Returns
float
GetTotalSamplesPCM16 ( contentLength )
Gets pcm sample count from byte content length (1 sample = 2 bytes)
Signature
static int Meta.Voice.Audio.Decoding.AudioDecoderPcm.GetTotalSamplesPCM16(ulong contentLength)
Parameters
contentLength: ulong  The provided number of bytes
Returns
int
GetTotalSamplesPCM16 ( contentLength )
Gets pcm sample count from byte content length
Signature
static int Meta.Voice.Audio.Decoding.AudioDecoderPcm.GetTotalSamplesPCM16(int contentLength)
Parameters
contentLength: int  The provided number of bytes
Returns
int