Sat Apr 26 20:55:08 2008

Asterisk developer's documentation


plc.h File Reference

SpanDSP - a series of DSP components for telephony. More...

#include <stdint.h>

Include dependency graph for plc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  plc_state_t

Defines

#define _PLC_H_
#define CORRELATION_SPAN   160
#define PLC_HISTORY_LEN   (CORRELATION_SPAN + PLC_PITCH_MIN)
#define PLC_PITCH_MAX   40
#define PLC_PITCH_MIN   120
#define PLC_PITCH_OVERLAP_MAX   (PLC_PITCH_MIN >> 2)
#define SAMPLE_RATE   8000

Functions

int plc_fillin (plc_state_t *s, int16_t amp[], int len)
 Fill-in a block of missing audio samples.
plc_state_tplc_init (plc_state_t *s)
 Process a block of received V.29 modem audio samples.
int plc_rx (plc_state_t *s, int16_t amp[], int len)
 Process a block of received audio samples.


Detailed Description

SpanDSP - a series of DSP components for telephony.

plc.h

Author:
Steve Underwood <steveu@coppice.org>
Copyright (C) 2004 Steve Underwood

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

This version may be optionally licenced under the GNU LGPL licence.

A license has been granted to Digium (via disclaimer) for the use of this code.

Definition in file plc.h.


Define Documentation

#define CORRELATION_SPAN   160

The length over which the AMDF function looks for similarity (20 ms)

Definition at line 109 of file plc.h.

#define PLC_HISTORY_LEN   (CORRELATION_SPAN + PLC_PITCH_MIN)

History buffer length. The buffer much also be at leat 1.25 times PLC_PITCH_MIN, but that is much smaller than the buffer needs to be for the pitch assessment.

Definition at line 113 of file plc.h.

#define PLC_PITCH_MAX   40

Maximum allowed pitch (200 Hz)

Definition at line 105 of file plc.h.

#define PLC_PITCH_MIN   120

Minimum allowed pitch (66 Hz)

Definition at line 103 of file plc.h.

#define PLC_PITCH_OVERLAP_MAX   (PLC_PITCH_MIN >> 2)

Maximum pitch OLA window

Definition at line 107 of file plc.h.


Function Documentation

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.

Parameters:
s The packet loss concealer context.
amp The audio sample buffer.
len The number of samples to be synthesised.
Returns:
The number of samples synthesized.

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.

Parameters:
s The packet loss concealer context.
Returns:
A pointer to the he 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.

Parameters:
s The packet loss concealer context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples in the buffer.


Generated on Sat Apr 26 20:55:08 2008 for Asterisk - the Open Source PBX by  doxygen 1.5.1