Class G722Codec
SpanDSP - a series of DSP components for telephony
g722_decode.c - The ITU G.722 codec, decode part.
Written by Steve Underwood <steveu@coppice.org>
Copyright (C) 2005 Steve Underwood Ported to C# by Mark Heath 2011
Despite my general liking of the GPL, I place my own contributions to this code in the public domain for the benefit of all mankind - even the slimy ones who might try to proprietize my work and use it to my detriment.
Based in part on a single channel G.722 codec which is: Copyright (c) CMU 1993 Computer Science, Speech Group Chengxiang Lu and Alex Hauptmann
Inherited Members
Namespace: SipLib.Media
Assembly: SipLib.dll
Syntax
public class G722Codec
Methods
| Edit this page View SourceDecode(G722CodecState, short[], byte[], int)
Decodes a buffer of G722
Declaration
public int Decode(G722CodecState state, short[] outputBuffer, byte[] inputG722Data, int inputLength)
Parameters
Type | Name | Description |
---|---|---|
G722CodecState | state | Codec state |
short[] | outputBuffer | Output buffer (to contain decompressed PCM samples) |
byte[] | inputG722Data | |
int | inputLength | Number of bytes in input G722 data to decode |
Returns
Type | Description |
---|---|
int | Number of samples written into output buffer |
Encode(G722CodecState, byte[], short[], int)
Encodes a buffer of G722
Declaration
public int Encode(G722CodecState state, byte[] outputBuffer, short[] inputBuffer, int inputBufferCount)
Parameters
Type | Name | Description |
---|---|---|
G722CodecState | state | Codec state |
byte[] | outputBuffer | Output buffer (to contain encoded G722) |
short[] | inputBuffer | PCM 16 bit samples to encode |
int | inputBufferCount | Number of samples in the input buffer to encode |
Returns
Type | Description |
---|---|
int | Number of encoded bytes written into output buffer |