Files
asterisk/main/libresample/include/libresample.h
Russell Bryant 21cb767db7 Merge changes from team/russell/codec_resample
This commit imports libresample for use in Asterisk.  It also adds a new codec
module, codec_resample.  This module uses libresample to re-sample signed linear
audio between 8 kHz and 16 kHz.

It also provides an alternative for converting between 16 kHz G.722 and 8 kHz
signed linear when using G.722, which will likely be useful as some people have
complained about volume issues when the current codec_g722 converts to 8 kHz 
signed linear.  But, to test this, you will have to disable the g722-to-slin and
g722-to-slin16 translators in codec_g722.c.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 21:22:31 +00:00

45 lines
1.1 KiB
C

/**********************************************************************
resample.h
Real-time library interface by Dominic Mazzoni
Based on resample-1.7:
http://www-ccrma.stanford.edu/~jos/resample/
License: LGPL - see the file LICENSE.txt for more information
**********************************************************************/
#ifndef LIBRESAMPLE_INCLUDED
#define LIBRESAMPLE_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
void *resample_open(int highQuality,
double minFactor,
double maxFactor);
void *resample_dup(const void *handle);
int resample_get_filter_width(const void *handle);
int resample_process(void *handle,
double factor,
float *inBuffer,
int inBufferLen,
int lastFlag,
int *inBufferUsed,
float *outBuffer,
int outBufferLen);
void resample_close(void *handle);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* LIBRESAMPLE_INCLUDED */