![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Plugins Reference Manual | ![]() |
---|---|---|---|---|
"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
AudioTestSrc can be used to generate basic audio signals. It support several different waveforms and allows you to set the base frequency and volume.
gst-launch audiotestsrc ! audioconvert ! alsasink
This pipeline produces a sine with default frequency (mid-C) and volume.
gst-launch audiotestsrc wave=2 freq=200 ! audioconvert ! tee name=t ! queue ! alsasink t. ! queue ! libvisual_lv_scope ! ffmpegcolorspace ! 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.
plugin | audiotestsrc |
author | Stefan Kost <ensonic@users.sf.net> |
class | Source/Audio |
name | src |
direction | source |
presence | always |
details | audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)1 |
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 } GstAudioTestSrcWave;
Different types of supported sound waves.
freq
" property"freq" gdouble : Read / Write
Frequency of test signal.
Allowed values: [0,20000]
Default value: 440
is-live
" property"is-live" gboolean : Read / Write
Whether to act as a live source.
Default value: FALSE
samplesperbuffer
" property"samplesperbuffer" gint : Read / Write
Number of samples in each outgoing buffer.
Allowed values: >= 1
Default value: 1024
timestamp-offset
" property"timestamp-offset" gint64 : Read / Write
An offset added to timestamps set on buffers (in ns).
Default value: 0
volume
" property"volume" gdouble : Read / Write
Volume of test signal.
Allowed values: [0,1]
Default value: 0.8
wave
" property"wave" GstAudioTestSrcWave : Read / Write
Oscillator waveform.
Default value: Sine