TwiceAsNice  2019-02-18
Classes | Functions
libdspau-filters.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "libdspau.h"
Include dependency graph for libdspau-filters.c:

Classes

struct  Coefficient
 

Functions

int dspau_squarelawfilter (double *in, double *out, int len)
 A square law filter. More...
 
int dspau_lowpassfilter (double *in, double *out, int len, double SamplingFrequency, double Frequency, double Q)
 A low pass filter. More...
 
int dspau_highpassfilter (double *in, double *out, int len, double SamplingFrequency, double Frequency, double Q)
 A high pass filter. More...
 
double dspau_singlefilter (double yin, struct Coefficient *coefficient)
 
int dspau_bandrejectfilter (double *in, double *out, int len, double SamplingFrequency, double Frequency, double Q)
 A band reject filter. More...
 
int dspau_bandpassfilter (double *in, double *out, int len, double SamplingFrequency, double Frequency, double Q)
 A band pass filter. More...
 

Function Documentation

◆ dspau_bandpassfilter()

int dspau_bandpassfilter ( double *  in,
double *  out,
int  len,
double  samplingfrequency,
double  frequency,
double  q 
)

A band pass filter.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
samplingfrequencythe sampling frequency of the input stream.
frequencythe center frequency of the filter.
qthe cutoff slope.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_bandrejectfilter()

int dspau_bandrejectfilter ( double *  in,
double *  out,
int  len,
double  samplingfrequency,
double  frequency,
double  q 
)

A band reject filter.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
samplingfrequencythe sampling frequency of the input stream.
frequencythe center frequency of the filter.
qthe cutoff slope.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_highpassfilter()

int dspau_highpassfilter ( double *  in,
double *  out,
int  len,
double  samplingfrequency,
double  frequency,
double  q 
)

A high pass filter.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
samplingfrequencythe sampling frequency of the input stream.
frequencythe cutoff frequency of the filter.
qthe cutoff slope.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_lowpassfilter()

int dspau_lowpassfilter ( double *  in,
double *  out,
int  len,
double  samplingfrequency,
double  frequency,
double  q 
)

A low pass filter.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
samplingfrequencythe sampling frequency of the input stream.
frequencythe cutoff frequency of the filter.
qthe cutoff slope.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.

◆ dspau_singlefilter()

double dspau_singlefilter ( double  yin,
struct Coefficient coefficient 
)

◆ dspau_squarelawfilter()

int dspau_squarelawfilter ( double *  in,
double *  out,
int  len 
)

A square law filter.

Parameters
inthe input stream. (input)
outthe output stream. (output)
lenthe length of the input stream.
Returns
the output stream if successfull elaboration. NULL if an error is encountered. Return 0 if success. Return -1 if any error occurs.