Table of Contents

Class G722Codec

Namespace
NAudio.Codecs
Assembly
NAudio.Core.dll

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&gt;

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

state G722CodecState

Codec state

outputBuffer short[]

Output buffer (to contain decompressed PCM samples)

inputG722Data byte[]
inputLength int

Number 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

state G722CodecState

Codec state

outputBuffer byte[]

Output buffer (to contain encoded G722)

inputBuffer short[]

PCM 16 bit samples to encode

inputBufferCount int

Number of samples in the input buffer to encode

Returns

int

Number of encoded bytes written into output buffer