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
Inheritance
Inherited Members
Namespace: SIPSorcery.Media
Assembly: SIPSorcery.dll
Syntax
public class G722Codec
Methods
| Improve this Doc View SourceDecode(G722CodecState, Int16[], Byte[], Int32)
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 |
System.Int16[] | outputBuffer | Output buffer (to contain decompressed PCM samples) |
System.Byte[] | inputG722Data | |
System.Int32 | inputLength | Number of bytes in input G722 data to decode |
Returns
Type | Description |
---|---|
System.Int32 | Number of samples written into output buffer |
Encode(G722CodecState, Byte[], Int16[], Int32)
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 |
System.Byte[] | outputBuffer | Output buffer (to contain encoded G722) |
System.Int16[] | inputBuffer | PCM 16 bit samples to encode |
System.Int32 | inputBufferCount | Number of samples in the input buffer to encode |
Returns
Type | Description |
---|---|
System.Int32 | Number of encoded bytes written into output buffer |