Top | ![]() |
![]() |
![]() |
![]() |
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseTransform ╰── GstAudioFilter ╰── GstAudioFXBaseFIRFilter ╰── GstAudioFIRFilter
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.
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../../../tests/examples/audiofx/firfilter-example.c" />
plugin |
audiofx |
author |
Sebastian Dröge <sebastian.droege@collabora.co.uk> |
class |
Filter/Effect/Audio |
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 |
“rate-changed”
signalvoid 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.
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