Classes | Macros | Typedefs | Functions | Variables
porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c File Reference
#include "speex/speex_resampler.h"
#include "arch.h"
#include "os_support.h"
#include <math.h>
#include <limits.h>
#include <stdlib.h>
#include "speex_resampler.h"
Include dependency graph for porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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_funcdef)
 
#define KAISER12   (&kaiser12_funcdef)
 
#define KAISER6   (&kaiser6_funcdef)
 
#define KAISER8   (&kaiser8_funcdef)
 
#define M_PI   3.14159265358979323846
 
#define NULL   0
 
#define UINT32_MAX   4294967295U
 

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 spx_uint32_t compute_gcd (spx_uint32_t a, spx_uint32_t b)
 
static void cubic_coef (spx_word16_t frac, spx_word16_t interp[4])
 
static int multiply_frac (spx_uint32_t *result, spx_uint32_t value, spx_uint32_t num, spx_uint32_t den)
 
static int resampler_basic_direct_double (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_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_double (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 SpeexResamplerStatespeex_resampler_init (spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err)
 
EXPORT SpeexResamplerStatespeex_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)
 
const EXPORT char * speex_resampler_strerror (int err)
 
static int update_filter (SpeexResamplerState *st)
 

Variables

static const struct FuncDef kaiser10_funcdef = {kaiser10_table, 32}
 
static const double kaiser10_table [36]
 
static const struct FuncDef kaiser12_funcdef = {kaiser12_table, 64}
 
static const double kaiser12_table [68]
 
static const struct FuncDef kaiser6_funcdef = {kaiser6_table, 32}
 
static const double kaiser6_table [36]
 
static const struct FuncDef kaiser8_funcdef = {kaiser8_table, 32}
 
static const double kaiser8_table [36]
 
static const struct QualityMapping quality_map [11]
 

Macro Definition Documentation

◆ FIXED_STACK_ALLOC

#define FIXED_STACK_ALLOC   1024

◆ IMAX

#define IMAX (   a,
 
)    ((a) > (b) ? (a) : (b))

◆ IMIN

#define IMIN (   a,
 
)    ((a) < (b) ? (a) : (b))

◆ KAISER10

#define KAISER10   (&kaiser10_funcdef)

◆ KAISER12

#define KAISER12   (&kaiser12_funcdef)

◆ KAISER6

#define KAISER6   (&kaiser6_funcdef)

◆ KAISER8

#define KAISER8   (&kaiser8_funcdef)

◆ M_PI

#define M_PI   3.14159265358979323846

◆ NULL

#define NULL   0

◆ UINT32_MAX

#define UINT32_MAX   4294967295U

Typedef Documentation

◆ resampler_basic_func

typedef int(* resampler_basic_func) (SpeexResamplerState *, spx_uint32_t, const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *)

Function Documentation

◆ compute_func()

static double compute_func ( float  x,
const struct FuncDef func 
)
static

◆ compute_gcd()

static spx_uint32_t compute_gcd ( spx_uint32_t  a,
spx_uint32_t  b 
)
inlinestatic

◆ cubic_coef()

static void cubic_coef ( spx_word16_t  frac,
spx_word16_t  interp[4] 
)
static

◆ multiply_frac()

static int multiply_frac ( spx_uint32_t *  result,
spx_uint32_t  value,
spx_uint32_t  num,
spx_uint32_t  den 
)
static

◆ resampler_basic_direct_double()

static int resampler_basic_direct_double ( 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

◆ resampler_basic_direct_single()

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

◆ resampler_basic_interpolate_double()

static int resampler_basic_interpolate_double ( 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

◆ resampler_basic_interpolate_single()

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

◆ resampler_basic_zero()

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

◆ sinc()

static spx_word16_t sinc ( float  cutoff,
float  x,
int  N,
const struct FuncDef window_func 
)
static

◆ speex_resampler_destroy()

EXPORT void speex_resampler_destroy ( SpeexResamplerState st)

Destroy a resampler state.

Parameters
stResampler state

Definition at line 868 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_input_latency()

EXPORT int speex_resampler_get_input_latency ( SpeexResamplerState st)

Get the latency introduced by the resampler measured in input samples.

Parameters
stResampler state

Definition at line 1190 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_input_stride()

EXPORT void speex_resampler_get_input_stride ( SpeexResamplerState st,
spx_uint32_t *  stride 
)

Get the input stride.

Parameters
stResampler state
strideInput stride copied

Definition at line 1175 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_output_latency()

EXPORT int speex_resampler_get_output_latency ( SpeexResamplerState st)

Get the latency introduced by the resampler measured in output samples.

Parameters
stResampler state

Definition at line 1195 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_output_stride()

EXPORT void speex_resampler_get_output_stride ( SpeexResamplerState st,
spx_uint32_t *  stride 
)

Get the output stride.

Parameters
stResampler state copied
strideOutput stride

Definition at line 1185 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_quality()

EXPORT void speex_resampler_get_quality ( SpeexResamplerState st,
int *  quality 
)

Get the conversion quality.

Parameters
stResampler state
qualityResampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality.

Definition at line 1165 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_rate()

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).

Parameters
stResampler state
in_rateInput sampling rate (integer number of Hz) copied.
out_rateOutput sampling rate (integer number of Hz) copied.

Definition at line 1089 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_get_ratio()

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.

Parameters
stResampler state
ratio_numNumerator of the sampling rate ratio copied
ratio_denDenominator of the sampling rate ratio copied

Definition at line 1147 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_init()

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.

Parameters
nb_channelsNumber of channels to be processed
in_rateInput sampling rate (integer number of Hz).
out_rateOutput sampling rate (integer number of Hz).
qualityResampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality.
Returns
Newly created resampler state
Return values
NULLError: not enough memory

Definition at line 794 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_init_frac()

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.

Parameters
nb_channelsNumber of channels to be processed
ratio_numNumerator of the sampling rate ratio
ratio_denDenominator of the sampling rate ratio
in_rateInput sampling rate rounded to the nearest integer (in Hz).
out_rateOutput sampling rate rounded to the nearest integer (in Hz).
qualityResampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality.
Returns
Newly created resampler state
Return values
NULLError: not enough memory

Definition at line 799 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_magic()

static int speex_resampler_magic ( SpeexResamplerState st,
spx_uint32_t  channel_index,
spx_word16_t **  out,
spx_uint32_t  out_len 
)
static

◆ speex_resampler_process_float()

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.

Parameters
stResampler state
channel_indexIndex of the channel to process for the multi-channel base (0 otherwise)
inInput buffer
in_lenNumber of input samples in the input buffer. Returns the number of samples processed
outOutput buffer
out_lenSize of the output buffer. Returns the number of samples written

Definition at line 927 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_process_int()

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.

Parameters
stResampler state
channel_indexIndex of the channel to process for the multi-channel base (0 otherwise)
inInput buffer
in_lenNumber of input samples in the input buffer. Returns the number of samples processed
outOutput buffer
out_lenSize of the output buffer. Returns the number of samples written

Definition at line 968 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_process_interleaved_float()

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.

Parameters
stResampler state
inInput buffer
in_lenNumber of input samples in the input buffer. Returns the number of samples processed. This is all per-channel.
outOutput buffer
out_lenSize of the output buffer. Returns the number of samples written. This is all per-channel.

Definition at line 1038 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_process_interleaved_int()

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.

Parameters
stResampler state
inInput buffer
in_lenNumber of input samples in the input buffer. Returns the number of samples processed. This is all per-channel.
outOutput buffer
out_lenSize of the output buffer. Returns the number of samples written. This is all per-channel.

Definition at line 1061 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_process_native()

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 
)
static

◆ speex_resampler_reset_mem()

EXPORT int speex_resampler_reset_mem ( SpeexResamplerState st)

Reset a resampler so a new (unrelated) stream can be processed.

Parameters
stResampler state

Definition at line 1208 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_set_input_stride()

EXPORT void speex_resampler_set_input_stride ( SpeexResamplerState st,
spx_uint32_t  stride 
)

Set (change) the input stride.

Parameters
stResampler state
strideInput stride

Definition at line 1170 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_set_output_stride()

EXPORT void speex_resampler_set_output_stride ( SpeexResamplerState st,
spx_uint32_t  stride 
)

Set (change) the output stride.

Parameters
stResampler state
strideOutput stride

Definition at line 1180 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_set_quality()

EXPORT int speex_resampler_set_quality ( SpeexResamplerState st,
int  quality 
)

Set (change) the conversion quality.

Parameters
stResampler state
qualityResampling quality between 0 and 10, where 0 has poor quality and 10 has very high quality.

Definition at line 1153 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_set_rate()

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).

Parameters
stResampler state
in_rateInput sampling rate (integer number of Hz).
out_rateOutput sampling rate (integer number of Hz).

Definition at line 1084 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ 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).

Parameters
stResampler state
ratio_numNumerator of the sampling rate ratio
ratio_denDenominator of the sampling rate ratio
in_rateInput sampling rate rounded to the nearest integer (in Hz).
out_rateOutput sampling rate rounded to the nearest integer (in Hz).

Definition at line 1107 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_skip_zeros()

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).

Parameters
stResampler state

Definition at line 1200 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ speex_resampler_strerror()

const EXPORT char* speex_resampler_strerror ( int  err)

Returns the English meaning for an error code

Parameters
errError code
Returns
English string

Definition at line 1222 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ update_filter()

static int update_filter ( SpeexResamplerState st)
static

Variable Documentation

◆ kaiser10_funcdef

const struct FuncDef kaiser10_funcdef = {kaiser10_table, 32}
static

◆ kaiser10_table

const double kaiser10_table[36]
static
Initial value:
= {
0.99537781, 1.00000000, 0.99537781, 0.98162644, 0.95908712, 0.92831446,
0.89005583, 0.84522401, 0.79486424, 0.74011713, 0.68217934, 0.62226347,
0.56155915, 0.50119680, 0.44221549, 0.38553619, 0.33194107, 0.28205962,
0.23636152, 0.19515633, 0.15859932, 0.12670280, 0.09935205, 0.07632451,
0.05731132, 0.04193980, 0.02979584, 0.02044510, 0.01345224, 0.00839739,
0.00488951, 0.00257636, 0.00115101, 0.00035515, 0.00000000, 0.00000000}

Definition at line 170 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ kaiser12_funcdef

const struct FuncDef kaiser12_funcdef = {kaiser12_table, 64}
static

◆ kaiser12_table

const double kaiser12_table[68]
static
Initial value:
= {
0.99859849, 1.00000000, 0.99859849, 0.99440475, 0.98745105, 0.97779076,
0.96549770, 0.95066529, 0.93340547, 0.91384741, 0.89213598, 0.86843014,
0.84290116, 0.81573067, 0.78710866, 0.75723148, 0.72629970, 0.69451601,
0.66208321, 0.62920216, 0.59606986, 0.56287762, 0.52980938, 0.49704014,
0.46473455, 0.43304576, 0.40211431, 0.37206735, 0.34301800, 0.31506490,
0.28829195, 0.26276832, 0.23854851, 0.21567274, 0.19416736, 0.17404546,
0.15530766, 0.13794294, 0.12192957, 0.10723616, 0.09382272, 0.08164178,
0.07063950, 0.06075685, 0.05193064, 0.04409466, 0.03718069, 0.03111947,
0.02584161, 0.02127838, 0.01736250, 0.01402878, 0.01121463, 0.00886058,
0.00691064, 0.00531256, 0.00401805, 0.00298291, 0.00216702, 0.00153438,
0.00105297, 0.00069463, 0.00043489, 0.00025272, 0.00013031, 0.0000527734,
0.00001000, 0.00000000}

Definition at line 148 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ kaiser6_funcdef

const struct FuncDef kaiser6_funcdef = {kaiser6_table, 32}
static

◆ kaiser6_table

const double kaiser6_table[36]
static
Initial value:
= {
0.99733006, 1.00000000, 0.99733006, 0.98935595, 0.97618418, 0.95799003,
0.93501423, 0.90755855, 0.87598009, 0.84068475, 0.80211977, 0.76076565,
0.71712752, 0.67172623, 0.62508937, 0.57774224, 0.53019925, 0.48295561,
0.43647969, 0.39120616, 0.34752997, 0.30580127, 0.26632152, 0.22934058,
0.19505503, 0.16360756, 0.13508755, 0.10953262, 0.08693120, 0.06722600,
0.05031820, 0.03607231, 0.02432151, 0.01487334, 0.00752000, 0.00000000}

Definition at line 186 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ kaiser8_funcdef

const struct FuncDef kaiser8_funcdef = {kaiser8_table, 32}
static

◆ kaiser8_table

const double kaiser8_table[36]
static
Initial value:
= {
0.99635258, 1.00000000, 0.99635258, 0.98548012, 0.96759014, 0.94302200,
0.91223751, 0.87580811, 0.83439927, 0.78875245, 0.73966538, 0.68797126,
0.63451750, 0.58014482, 0.52566725, 0.47185369, 0.41941150, 0.36897272,
0.32108304, 0.27619388, 0.23465776, 0.19672670, 0.16255380, 0.13219758,
0.10562887, 0.08273982, 0.06335451, 0.04724088, 0.03412321, 0.02369490,
0.01563093, 0.00959968, 0.00527363, 0.00233883, 0.00050000, 0.00000000}

Definition at line 178 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

◆ quality_map

const struct QualityMapping quality_map[11]
static
Initial value:
= {
{ 8, 4, 0.830f, 0.860f, KAISER6 },
{ 16, 4, 0.850f, 0.880f, KAISER6 },
{ 32, 4, 0.882f, 0.910f, KAISER6 },
{ 48, 8, 0.895f, 0.917f, KAISER8 },
{ 64, 8, 0.921f, 0.940f, KAISER8 },
{ 80, 16, 0.922f, 0.940f, KAISER10},
{ 96, 16, 0.940f, 0.945f, KAISER10},
{128, 16, 0.950f, 0.950f, KAISER10},
{160, 16, 0.960f, 0.960f, KAISER10},
{192, 32, 0.968f, 0.968f, KAISER12},
{256, 32, 0.975f, 0.975f, KAISER12},
}

Definition at line 226 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c.

KAISER8
#define KAISER8
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:204
KAISER10
#define KAISER10
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:202
KAISER12
#define KAISER12
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:200
KAISER6
#define KAISER6
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:206


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:00