RetroArch
Classes | Macros | Enumerations | Functions | Variables
iir.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <retro_miscellaneous.h>
#include <libretro_dspfilter.h>
#include <string/stdstring.h>
Include dependency graph for iir.c:

Classes

struct  iir_data
 

Macros

#define sqr(a)   ((a) * (a))
 
#define CHECK(x)   if (string_is_equal(str, #x)) return x
 

Enumerations

enum  IIRFilter {
  LPF, HPF, BPCSGF, BPZPGF,
  APF, NOTCH, RIAA_phono, PEQ,
  BBOOST, LSH, HSH, RIAA_CD
}
 

Functions

static void iir_free (void *data)
 
static void iir_process (void *data, struct dspfilter_output *output, const struct dspfilter_input *input)
 
static enum IIRFilter str_to_type (const char *str)
 
static void make_poly_from_roots (const double *roots, unsigned num_roots, float *poly)
 
static void iir_filter_init (struct iir_data *iir, float sample_rate, float freq, float qual, float gain, enum IIRFilter filter_type)
 
static voidiir_init (const struct dspfilter_info *info, const struct dspfilter_config *config, void *userdata)
 
const struct dspfilter_implementationdspfilter_get_implementation (dspfilter_simd_mask_t mask)
 

Variables

static const struct dspfilter_implementation iir_plug
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   x)    if (string_is_equal(str, #x)) return x

◆ sqr

#define sqr (   a)    ((a) * (a))

Enumeration Type Documentation

◆ IIRFilter

enum IIRFilter
Enumerator
LPF 
HPF 
BPCSGF 
BPZPGF 
APF 
NOTCH 
RIAA_phono 
PEQ 
BBOOST 
LSH 
HSH 
RIAA_CD 

Function Documentation

◆ dspfilter_get_implementation()

const struct dspfilter_implementation* dspfilter_get_implementation ( dspfilter_simd_mask_t  mask)
Here is the call graph for this function:

◆ iir_filter_init()

static void iir_filter_init ( struct iir_data iir,
float  sample_rate,
float  freq,
float  qual,
float  gain,
enum IIRFilter  filter_type 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iir_free()

static void iir_free ( void data)
static
Here is the call graph for this function:

◆ iir_init()

static void* iir_init ( const struct dspfilter_info info,
const struct dspfilter_config config,
void userdata 
)
static
Here is the call graph for this function:

◆ iir_process()

static void iir_process ( void data,
struct dspfilter_output output,
const struct dspfilter_input input 
)
static

◆ make_poly_from_roots()

static void make_poly_from_roots ( const double *  roots,
unsigned  num_roots,
float *  poly 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_to_type()

static enum IIRFilter str_to_type ( const char *  str)
static
Here is the caller graph for this function:

Variable Documentation

◆ iir_plug

const struct dspfilter_implementation iir_plug
static
Initial value:
= {
"IIR",
"iir",
}
static void * iir_init(const struct dspfilter_info *info, const struct dspfilter_config *config, void *userdata)
Definition: iir.c:328
static void iir_process(void *data, struct dspfilter_output *output, const struct dspfilter_input *input)
Definition: iir.c:67
#define DSPFILTER_API_VERSION
Definition: libretro_dspfilter.h:61
static void iir_free(void *data)
Definition: iir.c:62