libg722_1  0.0.1
encoder.c File Reference
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include "g722_1/g722_1.h"
#include "defs.h"
#include "huff_tab.h"
#include "tables.h"
#include "bitstream.h"
#include "utilities.h"

Functions

int g722_1_encode_set_rate (g722_1_encode_state_t *s, int bit_rate)
 
g722_1_encode_state_tg722_1_encode_init (g722_1_encode_state_t *s, int bit_rate, int sample_rate)
 
int g722_1_encode_release (g722_1_encode_state_t *s)
 

Function Documentation

g722_1_encode_state_t* g722_1_encode_init ( g722_1_encode_state_t s,
int  bit_rate,
int  sample_rate 
)

Initialise a G.722.1 encode context.

Parameters
sThe G.722.1 encode context.
bit_rateThe required bit rate for the G.722.1 data. The valid rates are 48000, 32000 and 24000.
sample_rateThe required sampling rate. The valid rates are 16000 and 32000.
Returns
A pointer to the G.722.1 encode context, or NULL for error.
int g722_1_encode_release ( g722_1_encode_state_t s)

Release a G.722.1 encode context.

Parameters
sThe G.722.1 encode context.
Returns
0.
int g722_1_encode_set_rate ( g722_1_encode_state_t s,
int  bit_rate 
)

Change the bit rate for an G.722.1 decode context.

Parameters
sThe G.722.1 decode context.
bit_rateThe required bit rate for the G.722.1 data. The valid rates are 48000, 32000 and 24000.
Returns
0 for OK, or -1 for a bad parameter.