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

  s | The GSM 06.10 context.
  amp | The audio sample buffer.
  code | The GSM 06.10 data.
  len | The number of bytes of GSM 06.10 data to be decoded.

Returns
  The number of samples returned.

References gsm0610_unpack_wav49(), and gsm0610_state_s::packing.

## 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

  s | A pointer to a buffer into which the frames will be packed.
  c | The buffer containing the data to be unpacked. This must be at least 65 bytes long.

Returns
  The number of bytes absorbed.

Referenced by gsm0610_decode().