SpanDSP - a series of DSP components for telephony. More...
Go to the source code of this file.
Macros | |
#define | ATTENUATION_INCREMENT 0.0025 /* Attenuation per sample */ |
#define | FALSE 0 |
#define | INT16_MAX (32767) |
#define | INT16_MIN (-32767-1) |
#define | ms_to_samples(t) (((t)*DEFAULT_SAMPLE_RATE)/1000) |
#define | TRUE (!FALSE) |
Functions | |
static int __inline__ | amdf_pitch (int min_pitch, int max_pitch, int16_t amp[], int len) |
static int16_t | fsaturate (double damp) |
static void | normalise_history (plc_state_t *s) |
int | plc_fillin (plc_state_t *s, int16_t amp[], int len) |
Fill-in a block of missing audio samples. More... | |
plc_state_t * | plc_init (plc_state_t *s) |
Process a block of received V.29 modem audio samples. More... | |
int | plc_rx (plc_state_t *s, int16_t amp[], int len) |
Process a block of received audio samples. More... | |
static void | save_history (plc_state_t *s, int16_t *buf, int len) |
SpanDSP - a series of DSP components for telephony.
Definition in file plc.c.
#define ATTENUATION_INCREMENT 0.0025 /* Attenuation per sample */ |
Definition at line 58 of file plc.c.
Referenced by plc_fillin(), and plc_rx().
#define INT16_MAX (32767) |
Definition at line 53 of file plc.c.
Referenced by fsaturate().
#define INT16_MIN (-32767-1) |
Definition at line 54 of file plc.c.
Referenced by fsaturate().
#define ms_to_samples | ( | t | ) | (((t)*DEFAULT_SAMPLE_RATE)/1000) |
|
static |
Definition at line 108 of file plc.c.
References len().
Referenced by plc_fillin().
|
inlinestatic |
|
static |
Definition at line 94 of file plc.c.
References plc_state_t::buf_ptr, plc_state_t::history, and PLC_HISTORY_LEN.
Referenced by plc_fillin().
int plc_fillin | ( | plc_state_t * | s, |
int16_t | amp[], | ||
int | len | ||
) |
Fill-in a block of missing audio samples.
Fill-in a block of missing audio samples.
s | The packet loss concealer context. |
amp | The audio sample buffer. |
len | The number of samples to be synthesised. |
Definition at line 175 of file plc.c.
References amdf_pitch(), ATTENUATION_INCREMENT, CORRELATION_SPAN, for(), fsaturate(), plc_state_t::history, len(), plc_state_t::missing_samples, normalise_history(), plc_state_t::pitch, plc_state_t::pitch_offset, plc_state_t::pitchbuf, PLC_HISTORY_LEN, PLC_PITCH_MAX, PLC_PITCH_MIN, and save_history().
Referenced by adjust_frame_for_plc().
plc_state_t* plc_init | ( | plc_state_t * | s | ) |
Process a block of received V.29 modem audio samples.
Process a block of received V.29 modem audio samples.
s | The packet loss concealer context. |
int plc_rx | ( | plc_state_t * | s, |
int16_t | amp[], | ||
int | len | ||
) |
Process a block of received audio samples.
Process a block of received audio samples.
s | The packet loss concealer context. |
amp | The audio sample buffer. |
len | The number of samples in the buffer. |
Definition at line 132 of file plc.c.
References ATTENUATION_INCREMENT, fsaturate(), len(), plc_state_t::missing_samples, plc_state_t::pitch, plc_state_t::pitch_offset, plc_state_t::pitchbuf, and save_history().
Referenced by adjust_frame_for_plc().
|
static |
Definition at line 71 of file plc.c.
References plc_state_t::buf_ptr, plc_state_t::history, len(), and PLC_HISTORY_LEN.
Referenced by plc_fillin(), and plc_rx().