# nb_celp.h File Reference

Narrowband CELP encoder/decoder. More...

`#include "modes.h"`
`#include <speex/speex_bits.h>`
`#include <speex/speex_callbacks.h>`
`#include "vbr.h"`
`#include "filters.h"`

## Classes
struct | EncState
struct | DecState
## Functions
void * | nb_encoder_init (const SpeexMode *m)
void | nb_encoder_destroy (void *state)
int | nb_encode (void *state, void *in, SpeexBits *bits)
void * | nb_decoder_init (const SpeexMode *m)
void | nb_decoder_destroy (void *state)
int | nb_decode (void *state, SpeexBits *bits, void *out)
int | nb_encoder_ctl (void *state, int request, void *ptr)
int | nb_decoder_ctl (void *state, int request, void *ptr)

## Detailed Description

Narrowband CELP encoder/decoder.

## Function Documentation

int nb_decode | ( | void * | state,
|  | SpeexBits * | bits,
|  | void * | out |
| ) |  |  |

Decodes one frame

int nb_decoder_ctl | ( | void * | state,
|  | int | request,
|  | void * | ptr |
| ) |  |  |

ioctl-like function for controlling a narrowband decoder

void nb_decoder_destroy | ( | void * | state | ) |

De-allocates decoder state resources

void* nb_decoder_init | ( | const SpeexMode * | m | ) |

Initializes decoder state

int nb_encode | ( | void * | state,
|  | void * | in,
|  | SpeexBits * | bits |
| ) |  |  |

Encodes one frame

int nb_encoder_ctl | ( | void * | state,
|  | int | request,
|  | void * | ptr |
| ) |  |  |

ioctl-like function for controlling a narrowband encoder

void nb_encoder_destroy | ( | void * | state | ) |

De-allocates encoder state resources

void* nb_encoder_init | ( | const SpeexMode * | m | ) |

Initializes encoder state