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
public class G722Codec
- Inheritance
-
G722Codec
- Inherited Members
Methods
Decode(G722CodecState, short[], byte[], int)
Decodes a buffer of G722
public int Decode(G722CodecState state, short[] outputBuffer, byte[] inputG722Data, int inputLength)
Parameters
stateG722CodecStateCodec state
outputBuffershort[]Output buffer (to contain decompressed PCM samples)
inputG722Databyte[]inputLengthintNumber of bytes in input G722 data to decode
Returns
- int
Number of samples written into output buffer
Encode(G722CodecState, byte[], short[], int)
Encodes a buffer of G722
public int Encode(G722CodecState state, byte[] outputBuffer, short[] inputBuffer, int inputBufferCount)
Parameters
stateG722CodecStateCodec state
outputBufferbyte[]Output buffer (to contain encoded G722)
inputBuffershort[]PCM 16 bit samples to encode
inputBufferCountintNumber of samples in the input buffer to encode
Returns
- int
Number of encoded bytes written into output buffer