gsm0610_encode.c File Reference

#include <assert.h>
#include <inttypes.h>
#include <stdlib.h>
#include <memory.h>
#include "spandsp/telephony.h"
#include "spandsp/dc_restore.h"
#include "spandsp/bitstream.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"

Functions

gsm0610_state_tgsm0610_init (gsm0610_state_t *s, int packing)
int gsm0610_release (gsm0610_state_t *s)
int gsm0610_pack_none (uint8_t c[], gsm0610_frame_t *s)
int gsm0610_pack_wav49 (uint8_t code[], gsm0610_frame_t *s, int half)
int gsm0610_pack_voip (uint8_t code[], gsm0610_frame_t *s)
int gsm0610_encode (gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int quant)

Detailed Description


Function Documentation

int gsm0610_encode ( gsm0610_state_t s,
uint8_t  code[],
const int16_t  amp[],
int  quant 
)

Encode a buffer of linear PCM data to GSM 06.10.

Parameters:
s The GSM 06.10 context.
ima_data The GSM 06.10 data produced.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of bytes of GSM 06.10 data produced.

gsm0610_state_t* gsm0610_init ( gsm0610_state_t s,
int  packing 
)

Initialise a GSM 06.10 encode or decode context.

Parameters:
s The GSM 06.10 context
packing One of the GSM0610_PACKING_xxx options.
Returns:
A pointer to the GSM 06.10 context, or NULL for error.


Generated on Tue Jul 24 11:29:29 2007 for libspandsp by  doxygen 1.5.2