audiofirfilter

## audiofirfilter audiofirfilter |

## Properties

GValueArray * | kernel | Read / Write
guint64 | latency | Read / Write

## Signals

void | rate-changed | Run Last

## Types and Values

struct | GstAudioFIRFilter

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstAudioFilter
                            ╰── GstAudioFXBaseFIRFilter
                                ╰── GstAudioFIRFilter

## Description

audiofirfilter implements a generic audio FIR filter. Before usage the "kernel" property has to be set to the filter kernel that should be used and the "latency" property has to be set to the latency (in samples) that is introduced by the filter kernel. Setting a latency of n samples will lead to the first n samples being dropped from the output and n samples added to the end.

The filter kernel describes the impulse response of the filter. To calculate the frequency response of the filter you have to calculate the Fourier Transform of the impulse response.

To change the filter kernel whenever the sampling rate changes the "rate-changed" signal can be used. This should be done for most FIR filters as they're depending on the sampling rate.

### Example application

    1
    <span style="color: red"><xi:include></xi:include></span>

## Synopsis

### Element Information

plugin | audiofx
author | Sebastian Dröge <sebastian.droege@collabora.co.uk>
class | Filter/Effect/Audio

### Element Pads

name | sink
direction | sink
presence | always
details | audio/x-raw, format=(string){ F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved

name | src
direction | source
presence | always
details | audio/x-raw, format=(string){ F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved

## Functions

## Types and Values

### struct GstAudioFIRFilter

    struct GstAudioFIRFilter;

Opaque data structure.

## Property Details

### The `“kernel”` property

      “kernel”                   GValueArray *

Filter kernel for the FIR filter.

Flags: Read / Write

### The `“latency”` property

      “latency”                  guint64

Filter latency in samples.

Flags: Read / Write

Default value: 0

## Signal Details

### The `“rate-changed”` signal

    void
    user_function (GstAudioFIRFilter *filter,
                   gint               rate,
                   gpointer           user_data)

Will be emitted when the sampling rate changes. The callbacks will be called from the streaming thread and processing will stop until the event is handled.

#### Parameters

filter | the filter on which the signal is emitted |
rate | the new sampling rate |
user_data | user data set when the signal handler was connected. |

Flags: Run Last