spandsp 0.0.6
gsm0610_decode.c File Reference
#include <assert.h>
#include <inttypes.h>
#include "floating_fudge.h"
#include <stdlib.h>
#include <memory.h>
#include "spandsp/telephony.h"
#include "spandsp/fast_convert.h"
#include "spandsp/bitstream.h"
#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"

Functions

int gsm0610_unpack_none (gsm0610_frame_t *s, const uint8_t c[])
 
int gsm0610_unpack_wav49 (gsm0610_frame_t *s, const uint8_t c[])
 
int gsm0610_unpack_voip (gsm0610_frame_t *s, const uint8_t c[33])
 
int gsm0610_decode (gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len)
 

Function Documentation

◆ gsm0610_decode()

int gsm0610_decode ( gsm0610_state_t s,
int16_t  amp[],
const uint8_t  code[],
int  len 
)

Decode a buffer of GSM 06.10 data to linear PCM.

Parameters
sThe GSM 06.10 context.
ampThe audio sample buffer.
codeThe GSM 06.10 data.
lenThe number of bytes of GSM 06.10 data to be decoded.
Returns
The number of samples returned.

◆ gsm0610_unpack_wav49()

int gsm0610_unpack_wav49 ( gsm0610_frame_t s,
const uint8_t  c[] 
)

Unpack a pair of GSM 06.10 frames from the format used for wave files (wave type 49).

Parameters
sA pointer to a buffer into which the frames will be packed.
cThe buffer containing the data to be unpacked. This must be at least 65 bytes long.
Returns
The number of bytes absorbed.