Julius 4.2
マクロ定義 | 関数
libsent/src/adin/ds48to16.c

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

説明

48kHz -> 16kHz ダウンサンプリング

作者:
Akinobu LEE
日付:
Sun Feb 13 16:18:26 2005
Revision:
1.3

ds48to16.c で定義されています。


マクロ定義

#define mod (   x)    ((x) & (DS_RBSIZE -1))

USB device sampling rate.

filter parameters in header Buffer index cycler

ds48to16.c41 行で定義されています。

参照元 firin(), と firout().


関数

static void load_filter_from_header_2to1 ( DS_FILTER f) [static]

Set 1/2 filter coefficients from header values.

引数:
f[out] filter info

ds48to16.c51 行で定義されています。

参照元 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.c69 行で定義されています。

参照元 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.c125 行で定義されています。

参照元 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.c152 行で定義されています。

参照元 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
戻り値:
output value

ds48to16.c167 行で定義されています。

参照元 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
戻り値:
the number of samples written to dst, or -1 on errror.

ds48to16.c192 行で定義されています。

参照元 ds48to16().

DS_BUFFER* ds48to16_new ( )

Setup for down sampling.

戻り値:
newly allocated buffer for down sampling

ds48to16.c269 行で定義されています。

参照元 adin_setup_all().

void ds48to16_free ( DS_BUFFER ds)

Free the down sampling buffer.

引数:
ds[i/o] down sampling buffer to free

ds48to16.c307 行で定義されています。

参照元 adin_free_param().

int ds48to16 ( SP16 dst,
SP16 src,
int  srclen,
int  maxdstlen,
DS_BUFFER ds 
)

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
戻り値:
the number of samples written to dst, or -1 on errror.

ds48to16.c332 行で定義されています。

参照元 adin_cut().