gst-plugins-good  1.20.3
About: GStreamer (Good Plugins) is a library for constructing of graphs of media-handling components. A set of good-quality plug-ins (under LGPL license).
  Fossies Dox: gst-plugins-good-1.20.3.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

audioecho.c File Reference
#include <gst/gst.h>
#include <gst/base/gstbasetransform.h>
#include <gst/audio/audio.h>
#include <gst/audio/gstaudiofilter.h>
#include "audioecho.h"
Include dependency graph for audioecho.c:

Go to the source code of this file.

Macros

#define GST_CAT_DEFAULT   gst_audio_echo_debug
 
#define DEFAULT_SURROUND_MASK   ~((guint64)(0x3))
 
#define ALLOWED_CAPS
 
#define gst_audio_echo_parent_class   parent_class
 
#define TRANSFORM_FUNC(name, type)
 

Enumerations

enum  {
  PROP_0 , PROP_DELAY , PROP_MAX_DELAY , PROP_INTENSITY ,
  PROP_FEEDBACK , PROP_SUR_DELAY , PROP_SUR_MASK
}
 

Functions

 GST_DEBUG_CATEGORY_STATIC (gst_audio_echo_debug)
 
 G_DEFINE_TYPE (GstAudioEcho, gst_audio_echo, GST_TYPE_AUDIO_FILTER)
 
 GST_ELEMENT_REGISTER_DEFINE (audioecho, "audioecho", GST_RANK_NONE,(gst_audio_echo_get_type()))
 
static void gst_audio_echo_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void gst_audio_echo_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void gst_audio_echo_finalize (GObject *object)
 
static gboolean gst_audio_echo_setup (GstAudioFilter *self, const GstAudioInfo *info)
 
static gboolean gst_audio_echo_stop (GstBaseTransform *base)
 
static GstFlowReturn gst_audio_echo_transform_ip (GstBaseTransform *base, GstBuffer *buf)
 
static void gst_audio_echo_transform_float (GstAudioEcho *self, gfloat *data, guint num_samples)
 
static void gst_audio_echo_transform_double (GstAudioEcho *self, gdouble *data, guint num_samples)
 
static void gst_audio_echo_class_init (GstAudioEchoClass *klass)
 
static void gst_audio_echo_init (GstAudioEcho *self)
 

Macro Definition Documentation

◆ ALLOWED_CAPS

#define ALLOWED_CAPS
Value:
"audio/x-raw," \
" format=(string) {"GST_AUDIO_NE(F32)","GST_AUDIO_NE(F64)"}, " \
" rate=(int)[1,MAX]," \
" channels=(int)[1,MAX]," \
" layout=(string) interleaved"

Definition at line 79 of file audioecho.c.

◆ DEFAULT_SURROUND_MASK

#define DEFAULT_SURROUND_MASK   ~((guint64)(0x3))

Definition at line 66 of file audioecho.c.

◆ gst_audio_echo_parent_class

#define gst_audio_echo_parent_class   parent_class

Definition at line 86 of file audioecho.c.

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_audio_echo_debug

SECTION:element-audioecho @title: audioecho

audioecho adds an echo or (simple) reverb effect to an audio stream. The echo delay, intensity and the percentage of feedback can be configured.

For getting an echo effect you have to set the delay to a larger value, for example 200ms and more. Everything below will result in a simple reverb effect, which results in a slightly metallic sound.

Use the max-delay property to set the maximum amount of delay that will be used. This can only be set before going to the PAUSED or PLAYING state and will be set to the current delay by default.

audioecho can also be used to apply a configurable delay to audio channels by setting surround-delay=true. In that mode, it just delays "surround channels" by the delay amount instead of performing an echo. The channels that are configured surround channels for the delay are selected using the surround-channels mask property.

Example launch lines

|[ gst-launch-1.0 autoaudiosrc ! audioconvert ! audioecho delay=500000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink gst-launch-1.0 filesrc location="melo1.ogg" ! decodebin ! audioconvert ! audioecho delay=50000000 intensity=0.6 feedback=0.4 ! audioconvert ! autoaudiosink gst-launch-1.0 audiotestsrc ! audioconvert ! audio/x-raw,channels=4 ! audioecho surround-delay=true delay=500000000 ! audioconvert ! autoaudiosink ]|

Definition at line 62 of file audioecho.c.

◆ TRANSFORM_FUNC

#define TRANSFORM_FUNC (   name,
  type 
)

Definition at line 381 of file audioecho.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROP_0 
PROP_DELAY 
PROP_MAX_DELAY 
PROP_INTENSITY 
PROP_FEEDBACK 
PROP_SUR_DELAY 
PROP_SUR_MASK 

Definition at line 68 of file audioecho.c.

Function Documentation

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstAudioEcho  ,
gst_audio_echo  ,
GST_TYPE_AUDIO_FILTER   
)

◆ gst_audio_echo_class_init()

◆ gst_audio_echo_finalize()

static void gst_audio_echo_finalize ( GObject *  object)
static

◆ gst_audio_echo_get_property()

static void gst_audio_echo_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

◆ gst_audio_echo_init()

◆ gst_audio_echo_set_property()

static void gst_audio_echo_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

◆ gst_audio_echo_setup()

static gboolean gst_audio_echo_setup ( GstAudioFilter *  self,
const GstAudioInfo *  info 
)
static

◆ gst_audio_echo_stop()

static gboolean gst_audio_echo_stop ( GstBaseTransform *  base)
static

◆ gst_audio_echo_transform_double()

static void gst_audio_echo_transform_double ( GstAudioEcho self,
gdouble *  data,
guint  num_samples 
)
static

Definition at line 453 of file audioecho.c.

Referenced by gst_audio_echo_setup().

◆ gst_audio_echo_transform_float()

static void gst_audio_echo_transform_float ( GstAudioEcho self,
gfloat *  data,
guint  num_samples 
)
static

Definition at line 452 of file audioecho.c.

Referenced by gst_audio_echo_setup().

◆ gst_audio_echo_transform_ip()

static GstFlowReturn gst_audio_echo_transform_ip ( GstBaseTransform *  base,
GstBuffer *  buf 
)
static

◆ GST_DEBUG_CATEGORY_STATIC()

GST_DEBUG_CATEGORY_STATIC ( gst_audio_echo_debug  )

◆ GST_ELEMENT_REGISTER_DEFINE()

GST_ELEMENT_REGISTER_DEFINE ( audioecho  ,
"audioecho"  ,
GST_RANK_NONE  ,
(gst_audio_echo_get_type())   
)