audiotestsrc

## audiotestsrc audiotestsrc — Creates audio test signals of given frequency and volume |

## Synopsis

    struct              GstAudioTestSrc;
    enum                GstAudioTestSrcWave;

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GstObject
                   +----GstElement
                         +----GstBaseSrc
                               +----GstAudioTestSrc

## Properties

      "freq"                     gdouble               : Read / Write
      "is-live"                  gboolean              : Read / Write
      "samplesperbuffer"         gint                  : Read / Write
      "timestamp-offset"         gint64                : Read / Write
      "volume"                   gdouble               : Read / Write
      "wave"                     GstAudioTestSrcWave   : Read / Write
      "can-activate-pull"        gboolean              : Read / Write
      "can-activate-push"        gboolean              : Read / Write

## Description

AudioTestSrc can be used to generate basic audio signals. It support several different waveforms and allows to set the base frequency and volume.

### Example launch line

    1
    gst-launch audiotestsrc ! audioconvert ! alsasink

This pipeline produces a sine with default frequency, 440 Hz, and the default volume, 0.8 (relative to a maximum 1.0).

    1
    gst-launch audiotestsrc wave=2 freq=200 ! audioconvert ! tee name=t ! queue ! alsasink t. ! queue ! libvisual_lv_scope ! videoconvert ! xvimagesink

In this example a saw wave is generated. The wave is shown using a scope visualizer from libvisual, allowing you to visually verify that the saw wave is correct.

## Synopsis

### Element Information

plugin | audiotestsrc
author | Stefan Kost <ensonic@users.sf.net>
class | Source/Audio

### Element Pads

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

## Details

### struct GstAudioTestSrc

    struct GstAudioTestSrc;

audiotestsrc object structure.

### enum GstAudioTestSrcWave

    typedef enum {
      GST_AUDIO_TEST_SRC_WAVE_SINE,
      GST_AUDIO_TEST_SRC_WAVE_SQUARE,
      GST_AUDIO_TEST_SRC_WAVE_SAW,
      GST_AUDIO_TEST_SRC_WAVE_TRIANGLE,
      GST_AUDIO_TEST_SRC_WAVE_SILENCE,
      GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE,
      GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE,
      GST_AUDIO_TEST_SRC_WAVE_SINE_TAB,
      GST_AUDIO_TEST_SRC_WAVE_TICKS,
      GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE,
      GST_AUDIO_TEST_SRC_WAVE_RED_NOISE,
      GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE,
      GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE
    } GstAudioTestSrcWave;

Different types of supported sound waves.

`GST_AUDIO_TEST_SRC_WAVE_SINE` | a sine wave
`GST_AUDIO_TEST_SRC_WAVE_SQUARE` | a square wave
`GST_AUDIO_TEST_SRC_WAVE_SAW` | a saw wave
`GST_AUDIO_TEST_SRC_WAVE_TRIANGLE` | a tringle wave
`GST_AUDIO_TEST_SRC_WAVE_SILENCE` | silence
`GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE` | white uniform noise
`GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE` | pink noise
`GST_AUDIO_TEST_SRC_WAVE_SINE_TAB` | sine wave using a table
`GST_AUDIO_TEST_SRC_WAVE_TICKS` | periodic ticks
`GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE` | white (zero mean) Gaussian noise; volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples.
`GST_AUDIO_TEST_SRC_WAVE_RED_NOISE` | red (brownian) noise
`GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE` | spectraly inverted pink noise
`GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE` | spectraly inverted red (brownian) noise

## Property Details

### The `"freq"` property

      "freq"                     gdouble               : Read / Write

Frequency of test signal.

Allowed values: [0,20000]

Default value: 440

### The `"is-live"` property

      "is-live"                  gboolean              : Read / Write

Whether to act as a live source.

Default value: FALSE

### The `"samplesperbuffer"` property

      "samplesperbuffer"         gint                  : Read / Write

Number of samples in each outgoing buffer.

Allowed values: >= 1

Default value: 1024

### The `"timestamp-offset"` property

      "timestamp-offset"         gint64                : Read / Write

An offset added to timestamps set on buffers (in ns).

Default value: 0

### The `"volume"` property

      "volume"                   gdouble               : Read / Write

Volume of test signal.

Allowed values: [0,1]

Default value: 0.8

### The `"wave"` property

      "wave"                     GstAudioTestSrcWave   : Read / Write

Oscillator waveform.

Default value: Sine

### The `"can-activate-pull"` property

      "can-activate-pull"        gboolean              : Read / Write

Can activate in pull mode.

Default value: FALSE

### The `"can-activate-push"` property

      "can-activate-push"        gboolean              : Read / Write

Can activate in push mode.

Default value: TRUE