Digital sample-rate conversion

Functions

int dspl_resample_lagrange (double *s, int n, int p, int q, double frd, double **y, int *ny)
 Real signal digital resampling by using polynomial Lagrange interpolation. More...
 
int dspl_resample_spline (double *s, int n, int p, int q, double frd, double **y, int *ny)
 Real signal digital resampling by using polynomial spline interpolation. More...
 

Detailed Description

Function Documentation

◆ dspl_resample_lagrange()

int dspl_resample_lagrange ( double *  s,
int  n,
int  p,
int  q,
double  frd,
double **  z,
int *  nz 
)

Real signal digital resampling by using polynomial Lagrange interpolation.

Function convert input signal s samplerate p/q times and adds fractional delay from 0 to 1.

Parameters
[in]sPointer to the input signal s vector.
Vector size is [n x 1].

[in]nSize of the input signal vector.

[in]presampling factor p/q numerator.

[in]qresampling factor p/q denominator.

[in]frdAdditional fractional delay value.
Fractional delay value must be from 0 to 1.

[out]zOutput signal pointer.
Vector size is n*q/p.
Memory must be allocated.

[in]nzNumber of samples which is allocated for output vector z.

Returns
DSPL_OK if signal has been resampled successfully, error code otherwise.
Author
Sergey Bakhurin. www.dsplib.org
Examples:
resample_lagrange_ex_fs.c, resample_lagrange_ex_interp.c, resample_lagrange_filter_frac_delay.c, resample_lagrange_filter_interp.c, and resample_spline_ex_fs.c.

◆ dspl_resample_spline()

int dspl_resample_spline ( double *  s,
int  n,
int  p,
int  q,
double  frd,
double **  z,
int *  nz 
)

Real signal digital resampling by using polynomial spline interpolation.

Function convert input signal s samplerate p/q times and adds fractional delay from 0 to 1.

Parameters
[in]sPointer to the input signal s vector.
Vector size is [n x 1].

[in]nSize of the input signal vector.

[in]presampling factor p/q numerator.

[in]qresampling factor p/q denominator.

[in]frdAdditional fractional delay value.
Fractional delay value must be from 0 to 1.

[out]zOutput signal pointer.
Vector size is n*q/p.
Memory must be allocated.

[in]nzNumber of samples which is allocated for output vector z.

Returns
DSPL_OK if signal has been resampled successfully, error code otherwise.
Author
Sergey Bakhurin. www.dsplib.org
Examples:
resample_spline_ex_fs.c, resample_spline_ex_interp.c, resample_spline_filter_frac_delay.c, and resample_spline_filter_interp.c.

Select spelling error with your mouse and press Система Orphus