Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "speex/speex_resampler.h"
#include "arch.h"
#include "os_support.h"
#include "stack_alloc.h"
#include <math.h>
#include <limits.h>
Go to the source code of this file.
Data Structures | |
struct | FuncDef |
struct | QualityMapping |
struct | SpeexResamplerState_ |
Macros | |
#define | FIXED_STACK_ALLOC 1024 |
#define | IMAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | IMIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | KAISER10 (&_KAISER10) |
#define | KAISER12 (&_KAISER12) |
#define | KAISER6 (&_KAISER6) |
#define | KAISER8 (&_KAISER8) |
#define | M_PI 3.14159265358979323846 |
#define | NULL 0 |
#define | WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x))) |
Typedefs | |
typedef int(* | resampler_basic_func) (SpeexResamplerState *, spx_uint32_t, const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *) |
Functions | |
static double | compute_func (float x, const struct FuncDef *func) |
static void | cubic_coef (spx_word16_t x, spx_word16_t interp[4]) |
static int | resampler_basic_direct_single (SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len) |
static int | resampler_basic_interpolate_single (SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len) |
static int | resampler_basic_zero (SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len) |
static spx_word16_t | sinc (float cutoff, float x, int N, const struct FuncDef *window_func) |
EXPORT void | speex_resampler_destroy (SpeexResamplerState *st) |
EXPORT int | speex_resampler_get_input_latency (SpeexResamplerState *st) |
EXPORT void | speex_resampler_get_input_stride (SpeexResamplerState *st, spx_uint32_t *stride) |
EXPORT int | speex_resampler_get_output_latency (SpeexResamplerState *st) |
EXPORT void | speex_resampler_get_output_stride (SpeexResamplerState *st, spx_uint32_t *stride) |
EXPORT void | speex_resampler_get_quality (SpeexResamplerState *st, int *quality) |
EXPORT void | speex_resampler_get_rate (SpeexResamplerState *st, spx_uint32_t *in_rate, spx_uint32_t *out_rate) |
EXPORT void | speex_resampler_get_ratio (SpeexResamplerState *st, spx_uint32_t *ratio_num, spx_uint32_t *ratio_den) |
EXPORT SpeexResamplerState * | speex_resampler_init (spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) |
Create a new resampler with integer input and output rates. More... | |
EXPORT SpeexResamplerState * | speex_resampler_init_frac (spx_uint32_t nb_channels, spx_uint32_t ratio_num, spx_uint32_t ratio_den, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) |
static int | speex_resampler_magic (SpeexResamplerState *st, spx_uint32_t channel_index, spx_word16_t **out, spx_uint32_t out_len) |
EXPORT int | speex_resampler_process_float (SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) |
EXPORT int | speex_resampler_process_int (SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len) |
EXPORT int | speex_resampler_process_interleaved_float (SpeexResamplerState *st, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) |
EXPORT int | speex_resampler_process_interleaved_int (SpeexResamplerState *st, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len) |
static int | speex_resampler_process_native (SpeexResamplerState *st, spx_uint32_t channel_index, spx_uint32_t *in_len, spx_word16_t *out, spx_uint32_t *out_len) |
EXPORT int | speex_resampler_reset_mem (SpeexResamplerState *st) |
EXPORT void | speex_resampler_set_input_stride (SpeexResamplerState *st, spx_uint32_t stride) |
EXPORT void | speex_resampler_set_output_stride (SpeexResamplerState *st, spx_uint32_t stride) |
EXPORT int | speex_resampler_set_quality (SpeexResamplerState *st, int quality) |
EXPORT int | speex_resampler_set_rate (SpeexResamplerState *st, spx_uint32_t in_rate, spx_uint32_t out_rate) |
EXPORT int | speex_resampler_set_rate_frac (SpeexResamplerState *st, spx_uint32_t ratio_num, spx_uint32_t ratio_den, spx_uint32_t in_rate, spx_uint32_t out_rate) |
EXPORT int | speex_resampler_skip_zeros (SpeexResamplerState *st) |
EXPORT const char * | speex_resampler_strerror (int err) |
static int | update_filter (SpeexResamplerState *st) |
Variables | |
static const struct FuncDef | _KAISER10 = {kaiser10_table, 32} |
static const struct FuncDef | _KAISER12 = {kaiser12_table, 64} |
static const struct FuncDef | _KAISER6 = {kaiser6_table, 32} |
static const struct FuncDef | _KAISER8 = {kaiser8_table, 32} |
static const double | kaiser10_table [36] |
static const double | kaiser12_table [68] |
static const double | kaiser6_table [36] |
static const double | kaiser8_table [36] |
static const struct QualityMapping | quality_map [11] |
#define FIXED_STACK_ALLOC 1024 |
Definition at line 111 of file resample.c.
#define KAISER10 (&_KAISER10) |
Definition at line 204 of file resample.c.
#define KAISER12 (&_KAISER12) |
Definition at line 200 of file resample.c.
#define KAISER6 (&_KAISER6) |
Definition at line 208 of file resample.c.
#define KAISER8 (&_KAISER8) |
Definition at line 206 of file resample.c.
#define M_PI 3.14159265358979323846 |
Definition at line 83 of file resample.c.
#define NULL 0 |
Definition at line 96 of file resample.c.
#define WORD2INT | ( | x | ) | ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x))) |
Definition at line 87 of file resample.c.
typedef int(* resampler_basic_func) (SpeexResamplerState *, spx_uint32_t, const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *) |
Definition at line 114 of file resample.c.
|
static |
Definition at line 242 of file resample.c.
References FuncDef::oversample, and FuncDef::table.
Referenced by sinc().
|
static |
Definition at line 304 of file resample.c.
References EXTEND32, EXTRACT16, MULT16_16, MULT16_16_P15, PSHR32, Q15_ONE, QCONST16, SHR32, and SUB32.
Referenced by resampler_basic_interpolate_single().
|
static |
Definition at line 333 of file resample.c.
References SpeexResamplerState_::den_rate, SpeexResamplerState_::filt_len, SpeexResamplerState_::frac_advance, in, inner_product_single(), SpeexResamplerState_::int_advance, SpeexResamplerState_::last_sample, MULT16_16, out, SpeexResamplerState_::out_stride, SpeexResamplerState_::samp_frac_num, SATURATE32PSHR, and SpeexResamplerState_::sinc_table.
Referenced by update_filter().
|
static |
Definition at line 440 of file resample.c.
References cubic_coef(), SpeexResamplerState_::den_rate, SpeexResamplerState_::filt_len, SpeexResamplerState_::frac_advance, in, SpeexResamplerState_::int_advance, interpolate_product_single(), SpeexResamplerState_::last_sample, MULT16_16, MULT16_32_Q15, out, SpeexResamplerState_::out_stride, SpeexResamplerState_::oversample, PDIV32, SpeexResamplerState_::samp_frac_num, SATURATE32PSHR, SHL32, SHR32, and SpeexResamplerState_::sinc_table.
Referenced by update_filter().
|
static |
Definition at line 567 of file resample.c.
References SpeexResamplerState_::den_rate, SpeexResamplerState_::frac_advance, SpeexResamplerState_::int_advance, SpeexResamplerState_::last_sample, out, SpeexResamplerState_::out_stride, and SpeexResamplerState_::samp_frac_num.
Referenced by speex_resampler_process_float(), speex_resampler_process_int(), speex_resampler_process_interleaved_float(), speex_resampler_process_interleaved_int(), and update_filter().
|
static |
Definition at line 277 of file resample.c.
References compute_func(), M_PI, QualityMapping::window_func, and WORD2INT.
Referenced by update_filter().
EXPORT void speex_resampler_destroy | ( | SpeexResamplerState * | st | ) |
Destroy a resampler state.
st | Resampler state |
Definition at line 849 of file resample.c.
References SpeexResamplerState_::last_sample, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::samp_frac_num, and SpeexResamplerState_::sinc_table.
Referenced by resamp_destroy(), and speex_resampler_init_frac().
EXPORT int speex_resampler_get_input_latency | ( | SpeexResamplerState * | st | ) |
Get the latency in input samples introduced by the resampler.
st | Resampler state |
Definition at line 1159 of file resample.c.
References SpeexResamplerState_::filt_len.
EXPORT void speex_resampler_get_input_stride | ( | SpeexResamplerState * | st, |
spx_uint32_t * | stride | ||
) |
Get the input stride.
st | Resampler state |
stride | Input stride copied |
Definition at line 1144 of file resample.c.
References SpeexResamplerState_::in_stride.
EXPORT int speex_resampler_get_output_latency | ( | SpeexResamplerState * | st | ) |
Get the latency in output samples introduced by the resampler.
st | Resampler state |
Definition at line 1164 of file resample.c.
References SpeexResamplerState_::den_rate, SpeexResamplerState_::filt_len, and SpeexResamplerState_::num_rate.
EXPORT void speex_resampler_get_output_stride | ( | SpeexResamplerState * | st, |
spx_uint32_t * | stride | ||
) |
Get the output stride.
st | Resampler state copied |
stride | Output stride |
Definition at line 1154 of file resample.c.
References SpeexResamplerState_::out_stride.
EXPORT void speex_resampler_get_quality | ( | SpeexResamplerState * | st, |
int * | quality | ||
) |
Get the conversion quality.
st | Resampler state |
quality | Resampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality. |
Definition at line 1134 of file resample.c.
References quality, and SpeexResamplerState_::quality.
EXPORT void speex_resampler_get_rate | ( | SpeexResamplerState * | st, |
spx_uint32_t * | in_rate, | ||
spx_uint32_t * | out_rate | ||
) |
Get the current input/output sampling rates (integer value).
st | Resampler state |
in_rate | Input sampling rate (integer number of Hz) copied. |
out_rate | Output sampling rate (integer number of Hz) copied. |
Definition at line 1071 of file resample.c.
References SpeexResamplerState_::in_rate, and SpeexResamplerState_::out_rate.
EXPORT void speex_resampler_get_ratio | ( | SpeexResamplerState * | st, |
spx_uint32_t * | ratio_num, | ||
spx_uint32_t * | ratio_den | ||
) |
Get the current resampling ratio. This will be reduced to the least common denominator.
st | Resampler state |
ratio_num | Numerator of the sampling rate ratio copied |
ratio_den | Denominator of the sampling rate ratio copied |
Definition at line 1116 of file resample.c.
References SpeexResamplerState_::den_rate, and SpeexResamplerState_::num_rate.
EXPORT SpeexResamplerState * speex_resampler_init | ( | spx_uint32_t | nb_channels, |
spx_uint32_t | in_rate, | ||
spx_uint32_t | out_rate, | ||
int | quality, | ||
int * | err | ||
) |
Create a new resampler with integer input and output rates.
nb_channels | Number of channels to be processed |
in_rate | Input sampling rate (integer number of Hz). |
out_rate | Output sampling rate (integer number of Hz). |
quality | Resampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality. |
err |
NULL | Error: not enough memory |
Definition at line 783 of file resample.c.
References quality, and speex_resampler_init_frac().
Referenced by resamp_new().
EXPORT SpeexResamplerState * speex_resampler_init_frac | ( | spx_uint32_t | nb_channels, |
spx_uint32_t | ratio_num, | ||
spx_uint32_t | ratio_den, | ||
spx_uint32_t | in_rate, | ||
spx_uint32_t | out_rate, | ||
int | quality, | ||
int * | err | ||
) |
Create a new resampler with fractional input/output rates. The sampling rate ratio is an arbitrary rational number with both the numerator and denominator being 32-bit integers.
nb_channels | Number of channels to be processed |
ratio_num | Numerator of the sampling rate ratio |
ratio_den | Denominator of the sampling rate ratio |
in_rate | Input sampling rate rounded to the nearest integer (in Hz). |
out_rate | Output sampling rate rounded to the nearest integer (in Hz). |
quality | Resampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality. |
err |
NULL | Error: not enough memory |
Definition at line 788 of file resample.c.
References SpeexResamplerState_::buffer_size, SpeexResamplerState_::cutoff, SpeexResamplerState_::den_rate, SpeexResamplerState_::filt_len, SpeexResamplerState_::in_rate, SpeexResamplerState_::in_stride, SpeexResamplerState_::initialised, SpeexResamplerState_::last_sample, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::mem_alloc_size, SpeexResamplerState_::nb_channels, NULL, SpeexResamplerState_::num_rate, SpeexResamplerState_::out_rate, SpeexResamplerState_::out_stride, quality, SpeexResamplerState_::quality, RESAMPLER_ERR_INVALID_ARG, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, SpeexResamplerState_::samp_frac_num, SpeexResamplerState_::sinc_table_length, speex_resampler_destroy(), speex_resampler_set_quality(), speex_resampler_set_rate_frac(), SpeexResamplerState_::started, and update_filter().
Referenced by speex_resampler_init().
|
static |
Definition at line 885 of file resample.c.
References SpeexResamplerState_::filt_len, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::mem_alloc_size, out, SpeexResamplerState_::out_stride, and speex_resampler_process_native().
Referenced by speex_resampler_process_float(), and speex_resampler_process_int().
EXPORT int speex_resampler_process_float | ( | SpeexResamplerState * | st, |
spx_uint32_t | channel_index, | ||
const float * | in, | ||
spx_uint32_t * | in_len, | ||
float * | out, | ||
spx_uint32_t * | out_len | ||
) |
Resample a float array. The input and output buffers must not overlap.
st | Resampler state |
channel_index | Index of the channel to process for the multi-channel base (0 otherwise) |
in | Input buffer |
in_len | Number of input samples in the input buffer. Returns the number of samples processed |
out | Output buffer |
out_len | Size of the output buffer. Returns the number of samples written |
Definition at line 947 of file resample.c.
References ALLOC, SpeexResamplerState_::filt_len, FIXED_POINT, FIXED_STACK_ALLOC, in, SpeexResamplerState_::in_stride, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::mem_alloc_size, out, SpeexResamplerState_::out_stride, resampler_basic_zero(), RESAMPLER_ERR_ALLOC_FAILED, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, speex_resampler_magic(), speex_resampler_process_native(), VARDECL, and WORD2INT.
Referenced by speex_resampler_process_interleaved_float().
EXPORT int speex_resampler_process_int | ( | SpeexResamplerState * | st, |
spx_uint32_t | channel_index, | ||
const spx_int16_t * | in, | ||
spx_uint32_t * | in_len, | ||
spx_int16_t * | out, | ||
spx_uint32_t * | out_len | ||
) |
Resample an int array. The input and output buffers must not overlap.
st | Resampler state |
channel_index | Index of the channel to process for the multi-channel base (0 otherwise) |
in | Input buffer |
in_len | Number of input samples in the input buffer. Returns the number of samples processed |
out | Output buffer |
out_len | Size of the output buffer. Returns the number of samples written |
Definition at line 906 of file resample.c.
References SpeexResamplerState_::filt_len, in, SpeexResamplerState_::in_stride, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::mem_alloc_size, out, SpeexResamplerState_::out_stride, resampler_basic_zero(), RESAMPLER_ERR_ALLOC_FAILED, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, speex_resampler_magic(), and speex_resampler_process_native().
Referenced by resamp_framein(), and speex_resampler_process_interleaved_int().
EXPORT int speex_resampler_process_interleaved_float | ( | SpeexResamplerState * | st, |
const float * | in, | ||
spx_uint32_t * | in_len, | ||
float * | out, | ||
spx_uint32_t * | out_len | ||
) |
Resample an interleaved float array. The input and output buffers must not overlap.
st | Resampler state |
in | Input buffer |
in_len | Number of input samples in the input buffer. Returns the number of samples processed. This is all per-channel. |
out | Output buffer |
out_len | Size of the output buffer. Returns the number of samples written. This is all per-channel. |
Definition at line 1020 of file resample.c.
References in, SpeexResamplerState_::in_stride, SpeexResamplerState_::nb_channels, NULL, out, SpeexResamplerState_::out_stride, resampler_basic_zero(), RESAMPLER_ERR_ALLOC_FAILED, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, and speex_resampler_process_float().
EXPORT int speex_resampler_process_interleaved_int | ( | SpeexResamplerState * | st, |
const spx_int16_t * | in, | ||
spx_uint32_t * | in_len, | ||
spx_int16_t * | out, | ||
spx_uint32_t * | out_len | ||
) |
Resample an interleaved int array. The input and output buffers must not overlap.
st | Resampler state |
in | Input buffer |
in_len | Number of input samples in the input buffer. Returns the number of samples processed. This is all per-channel. |
out | Output buffer |
out_len | Size of the output buffer. Returns the number of samples written. This is all per-channel. |
Definition at line 1043 of file resample.c.
References in, SpeexResamplerState_::in_stride, SpeexResamplerState_::nb_channels, NULL, out, SpeexResamplerState_::out_stride, resampler_basic_zero(), RESAMPLER_ERR_ALLOC_FAILED, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, and speex_resampler_process_int().
|
static |
Definition at line 859 of file resample.c.
References SpeexResamplerState_::filt_len, SpeexResamplerState_::last_sample, SpeexResamplerState_::mem, SpeexResamplerState_::mem_alloc_size, out, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, and SpeexResamplerState_::started.
Referenced by speex_resampler_magic(), speex_resampler_process_float(), and speex_resampler_process_int().
EXPORT int speex_resampler_reset_mem | ( | SpeexResamplerState * | st | ) |
Reset a resampler so a new (unrelated) stream can be processed.
st | Resampler state |
Definition at line 1177 of file resample.c.
References SpeexResamplerState_::filt_len, SpeexResamplerState_::last_sample, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::nb_channels, RESAMPLER_ERR_SUCCESS, and SpeexResamplerState_::samp_frac_num.
EXPORT void speex_resampler_set_input_stride | ( | SpeexResamplerState * | st, |
spx_uint32_t | stride | ||
) |
Set (change) the input stride.
st | Resampler state |
stride | Input stride |
Definition at line 1139 of file resample.c.
References SpeexResamplerState_::in_stride.
EXPORT void speex_resampler_set_output_stride | ( | SpeexResamplerState * | st, |
spx_uint32_t | stride | ||
) |
Set (change) the output stride.
st | Resampler state |
stride | Output stride |
Definition at line 1149 of file resample.c.
References SpeexResamplerState_::out_stride.
EXPORT int speex_resampler_set_quality | ( | SpeexResamplerState * | st, |
int | quality | ||
) |
Set (change) the conversion quality.
st | Resampler state |
quality | Resampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality. |
Definition at line 1122 of file resample.c.
References SpeexResamplerState_::initialised, quality, SpeexResamplerState_::quality, RESAMPLER_ERR_INVALID_ARG, RESAMPLER_ERR_SUCCESS, and update_filter().
Referenced by speex_resampler_init_frac().
EXPORT int speex_resampler_set_rate | ( | SpeexResamplerState * | st, |
spx_uint32_t | in_rate, | ||
spx_uint32_t | out_rate | ||
) |
Set (change) the input/output sampling rates (integer value).
st | Resampler state |
in_rate | Input sampling rate (integer number of Hz). |
out_rate | Output sampling rate (integer number of Hz). |
Definition at line 1066 of file resample.c.
References speex_resampler_set_rate_frac().
EXPORT int speex_resampler_set_rate_frac | ( | SpeexResamplerState * | st, |
spx_uint32_t | ratio_num, | ||
spx_uint32_t | ratio_den, | ||
spx_uint32_t | in_rate, | ||
spx_uint32_t | out_rate | ||
) |
Set (change) the input/output sampling rates and resampling ratio (fractional values in Hz supported).
st | Resampler state |
ratio_num | Numerator of the sampling rate ratio |
ratio_den | Denominator of the sampling rate ratio |
in_rate | Input sampling rate rounded to the nearest integer (in Hz). |
out_rate | Output sampling rate rounded to the nearest integer (in Hz). |
Definition at line 1077 of file resample.c.
References SpeexResamplerState_::den_rate, IMIN, SpeexResamplerState_::in_rate, SpeexResamplerState_::initialised, SpeexResamplerState_::nb_channels, SpeexResamplerState_::num_rate, SpeexResamplerState_::out_rate, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::samp_frac_num, and update_filter().
Referenced by speex_resampler_init_frac(), and speex_resampler_set_rate().
EXPORT int speex_resampler_skip_zeros | ( | SpeexResamplerState * | st | ) |
Make sure that the first samples to go out of the resamplers don't have leading zeros. This is only useful before starting to use a newly created resampler. It is recommended to use that when resampling an audio file, as it will generate a file with the same length. For real-time processing, it is probably easier not to use this call (so that the output duration is the same for the first frame).
st | Resampler state |
Definition at line 1169 of file resample.c.
References SpeexResamplerState_::filt_len, SpeexResamplerState_::last_sample, SpeexResamplerState_::nb_channels, and RESAMPLER_ERR_SUCCESS.
EXPORT const char * speex_resampler_strerror | ( | int | err | ) |
Returns the English meaning for an error code
err | Error code |
Definition at line 1191 of file resample.c.
References RESAMPLER_ERR_ALLOC_FAILED, RESAMPLER_ERR_BAD_STATE, RESAMPLER_ERR_INVALID_ARG, RESAMPLER_ERR_PTR_OVERLAP, and RESAMPLER_ERR_SUCCESS.
|
static |
Definition at line 594 of file resample.c.
References QualityMapping::base_length, SpeexResamplerState_::buffer_size, SpeexResamplerState_::cutoff, SpeexResamplerState_::den_rate, QualityMapping::downsample_bandwidth, SpeexResamplerState_::filt_len, SpeexResamplerState_::frac_advance, if(), SpeexResamplerState_::int_advance, SpeexResamplerState_::last_sample, SpeexResamplerState_::magic_samples, SpeexResamplerState_::mem, SpeexResamplerState_::mem_alloc_size, SpeexResamplerState_::nb_channels, SpeexResamplerState_::num_rate, SpeexResamplerState_::oversample, QualityMapping::oversample, SpeexResamplerState_::quality, quality_map, resampler_basic_direct_single(), resampler_basic_interpolate_single(), resampler_basic_zero(), RESAMPLER_ERR_ALLOC_FAILED, RESAMPLER_ERR_SUCCESS, SpeexResamplerState_::resampler_ptr, sinc(), SpeexResamplerState_::sinc_table, SpeexResamplerState_::sinc_table_length, SpeexResamplerState_::started, QualityMapping::upsample_bandwidth, and QualityMapping::window_func.
Referenced by speex_resampler_init_frac(), speex_resampler_set_quality(), and speex_resampler_set_rate_frac().
|
static |
Definition at line 203 of file resample.c.
|
static |
Definition at line 199 of file resample.c.
|
static |
Definition at line 207 of file resample.c.
|
static |
Definition at line 205 of file resample.c.
|
static |
Definition at line 170 of file resample.c.
|
static |
Definition at line 148 of file resample.c.
|
static |
Definition at line 186 of file resample.c.
|
static |
Definition at line 178 of file resample.c.
|
static |
Definition at line 228 of file resample.c.
Referenced by update_filter().