Julius 4.2
|
48kHz -> 16kHz ダウンサンプリング [詳細]
#include <sent/stddefs.h>
#include <sent/adin.h>
#include "lpfcoef_3to4.h"
#include "lpfcoef_2to1.h"
マクロ定義 | |
#define | USE_HEADER_COEF |
TRUE if use embedded values on header. | |
#define | mod(x) ((x) & (DS_RBSIZE -1)) |
USB device sampling rate. | |
関数 | |
static void | load_filter_from_header_2to1 (DS_FILTER *f) |
Set 1/2 filter coefficients from header values. | |
static void | load_filter_from_header_3to4 (DS_FILTER *f) |
Set 4/2 filter coefficients from header values. | |
static void | init_filter (DS_FILTER *f, int d, int u) |
Initialize filter values. | |
static void | firin (DS_FILTER *f, double in) |
Store input for FIR filter. | |
static double | firout (DS_FILTER *f, int os) |
Get filtered output from FIR filter. | |
static int | do_filter (DS_FILTER *f, double *dst, double *src, int len, int maxlen) |
Perform down sampling of input samples. | |
DS_BUFFER * | ds48to16_new () |
Setup for down sampling. | |
void | ds48to16_free (DS_BUFFER *ds) |
Free the down sampling buffer. | |
int | ds48to16 (SP16 *dst, SP16 *src, int srclen, int maxdstlen, DS_BUFFER *ds) |
Perform down sampling of input samples to 1/3. |
#define mod | ( | x | ) | ((x) & (DS_RBSIZE -1)) |
USB device sampling rate.
filter parameters in header Buffer index cycler
ds48to16.c の 41 行で定義されています。
static void load_filter_from_header_2to1 | ( | DS_FILTER * | f | ) | [static] |
Set 1/2 filter coefficients from header values.
f | [out] filter info |
ds48to16.c の 51 行で定義されています。
参照元 ds48to16_new().
static void load_filter_from_header_3to4 | ( | DS_FILTER * | f | ) | [static] |
Set 4/2 filter coefficients from header values.
f | [out] filter info |
ds48to16.c の 69 行で定義されています。
参照元 ds48to16_new().
static void init_filter | ( | DS_FILTER * | f, |
int | d, | ||
int | u | ||
) | [static] |
Initialize filter values.
f | [i/o] filter info |
u | [in] up sampling rate |
d | [in] down sampling rate |
ds48to16.c の 125 行で定義されています。
参照元 ds48to16_new().
static void firin | ( | DS_FILTER * | f, |
double | in | ||
) | [static] |
Store input for FIR filter.
f | [i/o] filter info |
in | [in] an input sample |
ds48to16.c の 152 行で定義されています。
参照元 do_filter().
static double firout | ( | DS_FILTER * | f, |
int | os | ||
) | [static] |
Get filtered output from FIR filter.
f | [i/o] filter info |
os | [in] point |
ds48to16.c の 167 行で定義されています。
参照元 do_filter().
static int do_filter | ( | DS_FILTER * | f, |
double * | dst, | ||
double * | src, | ||
int | len, | ||
int | maxlen | ||
) | [static] |
Perform down sampling of input samples.
f | [i/o] filter info |
dst | [out] store the resulting samples |
src | [in] input samples |
len | [in] number of input samples |
maxlen | [in] maximum length of dst |
ds48to16.c の 192 行で定義されています。
参照元 ds48to16().
DS_BUFFER* ds48to16_new | ( | ) |
Setup for down sampling.
ds48to16.c の 269 行で定義されています。
参照元 adin_setup_all().
void ds48to16_free | ( | DS_BUFFER * | ds | ) |
Free the down sampling buffer.
ds | [i/o] down sampling buffer to free |
ds48to16.c の 307 行で定義されています。
参照元 adin_free_param().
Perform down sampling of input samples to 1/3.
dst | [out] store the resulting samples |
src | [in] input samples |
srclen | [in] number of input samples |
maxdstlen | [in] maximum length of dst |
ds | [i/o] down sampling buffer |
ds48to16.c の 332 行で定義されています。
参照元 adin_cut().