## gstbaseaudiosrc

gstbaseaudiosrc — Base class for audio sources

## Synopsis

    #include <gst/audio/gstbaseaudiosrc.h>

                        GstBaseAudioSrc;
                        GstBaseAudioSrcClass;
    #define             GST_BASE_AUDIO_SRC_CLOCK            (obj)
    #define             GST_BASE_AUDIO_SRC_PAD              (obj)
    GstRingBuffer*      gst_base_audio_src_create_ringbuffer
                                                            (GstBaseAudioSrc *src);

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBaseSrc
                         +----GstPushSrc
                               +----GstBaseAudioSrc
                                     +----GstAudioSrc

## Properties

      "buffer-time"              gint64                : Read / Write
      "latency-time"             gint64                : Read / Write

## Description

This is the base class for audio sources. Subclasses need to implement the ::create_ringbuffer vmethod. This base class will then take care of reading samples from the ringbuffer, synchronisation and flushing.

Last reviewed on 2006-09-27 (0.10.12)

## Details

### GstBaseAudioSrc

    typedef struct _GstBaseAudioSrc GstBaseAudioSrc;

Opaque GstBaseAudioSrc.

### GstBaseAudioSrcClass

    typedef struct {
      GstPushSrcClass parent_class;

      /* subclass ringbuffer allocation */
      GstRingBuffer* (*create_ringbuffer)  (GstBaseAudioSrc *src);
    } GstBaseAudioSrcClass;

GstBaseAudioSrc class. Override the vmethod to implement functionality.

GstPushSrcClass `parent_class`; | the parent class.
`create_ringbuffer` () | create and return a GstRingBuffer to read from.

### GST_BASE_AUDIO_SRC_CLOCK()

    #define GST_BASE_AUDIO_SRC_CLOCK(obj)    (GST_BASE_AUDIO_SRC (obj)->clock)

Get the GstClock of `obj`.

`obj` : | a GstBaseAudioSrc

### GST_BASE_AUDIO_SRC_PAD()

    #define GST_BASE_AUDIO_SRC_PAD(obj)      (GST_BASE_SRC (obj)->srcpad)

Get the source GstPad of `obj`.

`obj` : | a GstBaseAudioSrc

### gst_base_audio_src_create_ringbuffer ()

    GstRingBuffer*      gst_base_audio_src_create_ringbuffer
                                                            (GstBaseAudioSrc *src);

Create and return the GstRingBuffer for `src`. This function will call the ::create_ringbuffer vmethod and will set `src` as the parent of the returned buffer (see `gst_object_set_parent()`).

`src` : | a GstBaseAudioSrc.
Returns : | The new ringbuffer of `src`.

## Property Details

### The "`buffer-time`" property

      "buffer-time"              gint64                : Read / Write

Size of audio buffer in microseconds.

Allowed values: >= 1

Default value: 200000

### The "`latency-time`" property

      "latency-time"             gint64                : Read / Write

Audio latency in microseconds.

Allowed values: >= 1

Default value: 10000

## See Also

GstAudioSrc, GstRingBuffer.