AgsFluidIIRFilterUtil

AgsFluidIIRFilterUtil — util functions to fluid IIR filter

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── AgsFluidIIRFilterUtil

Includes

#include <ags/audio/ags_fluid_iir_filter_util.h>

Description

These utility functions allow you to calc and apply fluid IIR filter data.

Functions

AGS_FLUID_IIR_FILTER()

#define AGS_FLUID_IIR_FILTER(ptr)              ((AgsFluidIIRFilter *)(ptr))

ags_fluid_iir_filter_util_calc ()

void
ags_fluid_iir_filter_util_calc (AgsFluidIIRFilter *iir_filter,
                                gdouble output_rate,
                                gdouble fres_mod,
                                gint transition_samples);

Calc fluid IIR filter.

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

output_rate

the output rate

 

fres_mod

the fres mod

 

transition_samples

the transition samples

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_s8 ()

void
ags_fluid_iir_filter_util_apply_s8 (AgsFluidIIRFilter *iir_filter,
                                    gint8 *destination,
                                    gint8 *source,
                                    guint buffer_length);

ags_fluid_iir_filter_util_apply_s8 is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_s16 ()

void
ags_fluid_iir_filter_util_apply_s16 (AgsFluidIIRFilter *iir_filter,
                                     gint16 *destination,
                                     gint16 *source,
                                     guint buffer_length);

ags_fluid_iir_filter_util_apply_s16 is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_s24 ()

void
ags_fluid_iir_filter_util_apply_s24 (AgsFluidIIRFilter *iir_filter,
                                     gint32 *destination,
                                     gint32 *source,
                                     guint buffer_length);

ags_fluid_iir_filter_util_apply_s24 is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_s32 ()

void
ags_fluid_iir_filter_util_apply_s32 (AgsFluidIIRFilter *iir_filter,
                                     gint32 *destination,
                                     gint32 *source,
                                     guint buffer_length);

ags_fluid_iir_filter_util_apply_s32 is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_s64 ()

void
ags_fluid_iir_filter_util_apply_s64 (AgsFluidIIRFilter *iir_filter,
                                     gint64 *destination,
                                     gint64 *source,
                                     guint buffer_length);

ags_fluid_iir_filter_util_apply_s64 is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_float ()

void
ags_fluid_iir_filter_util_apply_float (AgsFluidIIRFilter *iir_filter,
                                       gfloat *destination,
                                       gfloat *source,
                                       guint buffer_length);

ags_fluid_iir_filter_util_apply_float is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_double ()

void
ags_fluid_iir_filter_util_apply_double
                               (AgsFluidIIRFilter *iir_filter,
                                gdouble *destination,
                                gdouble *source,
                                guint buffer_length);

ags_fluid_iir_filter_util_apply_double is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_apply_complex ()

void
ags_fluid_iir_filter_util_apply_complex
                               (AgsFluidIIRFilter *iir_filter,
                                AgsComplex *destination,
                                AgsComplex *source,
                                guint buffer_length);

ags_fluid_iir_filter_util_apply_complex is deprecated and should not be used in newly-written code.

Perform fluid IIR filter on buffer and return the result in output_buffer .

Parameters

iir_filter

the AgsFluidIIRFilter containing filter parameters

 

destination

the destination audio buffer

 

source

the source audio buffer

 

buffer_length

the buffer length

 

Since: 3.8.12


ags_fluid_iir_filter_util_get_type ()

GType
ags_fluid_iir_filter_util_get_type (void);

Types and Values

enum AgsFluidIIRFilterType

Members

AGS_FLUID_IIR_DISABLED

   

AGS_FLUID_IIR_LOWPASS

   

AGS_FLUID_IIR_HIGHPASS

   

AGS_FLUID_IIR_LAST

   

struct AgsFluidIIRFilter

struct AgsFluidIIRFilter {
  guint filter_type;
  guint flags;
  gdouble b02;
  gdouble b1;
  gdouble a1;
  gdouble a2;
  gdouble b02_incr;
  gdouble b1_incr;
  gdouble a1_incr;
  gdouble a2_incr;
  gint filter_coeff_incr_count;
  gint compensate_incr;
  gdouble hist1;
  gdouble hist2;
  gboolean filter_startup;
  gdouble fres;
  gdouble last_fres;
  gdouble q_lin;
  gdouble filter_gain;
};

AGS_TYPE_FLUID_IIR_FILTER_UTIL

#define AGS_TYPE_FLUID_IIR_FILTER_UTIL         (ags_fluid_iir_filter_util_get_type())

struct AgsFluidIIRFilterUtil

struct AgsFluidIIRFilterUtil {
  gpointer source;
  guint source_stride;

  gpointer destination;
  guint destination_stride;

  guint buffer_length;
  guint format;
  guint samplerate;

  guint filter_type;

  guint flags;

  gdouble b02;
  gdouble b1;
  gdouble a1;
  gdouble a2;
  gdouble b02_incr;
  gdouble b1_incr;
  gdouble a1_incr;
  gdouble a2_incr;

  gint filter_coeff_incr_count;
  gint compensate_incr;

  gdouble hist1;
  gdouble hist2;

  gboolean filter_startup;

  gdouble fres;
  gdouble last_fres;

  gdouble q_lin;
  gdouble filter_gain;
};