<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>audiotestsrc</title> <meta name="generator" content="DocBook XSL Stylesheets V1.72.0"> <link rel="start" href="index.html" title="GStreamer Base Plugins 0.10 Plugins Reference Manual"> <link rel="up" href="ch01.html" title="gst-plugins-base Elements"> <link rel="prev" href="gst-plugins-base-plugins-audioresample.html" title="audioresample"> <link rel="next" href="gst-plugins-base-plugins-cdparanoiasrc.html" title="cdparanoiasrc"> <meta name="generator" content="GTK-Doc V1.8 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> <link rel="chapter" href="ch01.html" title="gst-plugins-base Elements"> <link rel="chapter" href="ch02.html" title="gst-plugins-base Plugins"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> <tr valign="middle"> <td><a accesskey="p" href="gst-plugins-base-plugins-audioresample.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> <th width="100%" align="center">GStreamer Base Plugins 0.10 Plugins Reference Manual</th> <td><a accesskey="n" href="gst-plugins-base-plugins-cdparanoiasrc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2580763" class="shortcut">Top</a>  |  <a href="#id2587829" class="shortcut">Description</a>  |  <a href="#id2565035" class="shortcut">Object Hierarchy</a>  |  <a href="#id2570093" class="shortcut">Properties</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="gst-plugins-base-plugins-audiotestsrc"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> <a name="id2580763"></a><span class="refentrytitle">audiotestsrc</span> </h2> <p>audiotestsrc — Creates audio test signals of given frequency and volume</p> </td> <td valign="top" align="right"></td> </tr></table></div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <a name="GstAudioTestSrc"></a><pre class="synopsis"> <a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc-struct">GstAudioTestSrc</a>; enum <a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave">GstAudioTestSrcWave</a>; </pre> </div> <div class="refsect1" lang="en"> <a name="id2565035"></a><h2>Object Hierarchy</h2> <pre class="synopsis"> GObject +----GstObject +----GstElement +----GstBaseSrc +----GstAudioTestSrc </pre> </div> <div class="refsect1" lang="en"> <a name="id2570093"></a><h2>Properties</h2> <pre class="synopsis"> "<a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--freq">freq</a>" gdouble : Read / Write "<a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--is-live">is-live</a>" gboolean : Read / Write "<a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--samplesperbuffer">samplesperbuffer</a>" gint : Read / Write "<a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--timestamp-offset">timestamp-offset</a>" gint64 : Read / Write "<a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--volume">volume</a>" gdouble : Read / Write "<a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--wave">wave</a>" <a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave">GstAudioTestSrcWave</a> : Read / Write </pre> </div> <div class="refsect1" lang="en"> <a name="id2587829"></a><h2>Description</h2> <p> </p> <div class="refsect2" lang="en"> <a name="id2587842"></a><p> AudioTestSrc can be used to generate basic audio signals. It support several different waveforms and allows you to set the base frequency and volume. </p> <h3>Example launch line</h3> <p> </p> <pre class="programlisting"> gst-launch audiotestsrc ! audioconvert ! alsasink </pre> <p> This pipeline produces a sine with default frequency (mid-C) and volume. </p> <p> </p> <pre class="programlisting"> gst-launch audiotestsrc wave=2 freq=200 ! audioconvert ! tee name=t ! queue ! alsasink t. ! queue ! libvisual_lv_scope ! ffmpegcolorspace ! xvimagesink </pre> <p> 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. </p> </div> <div class="refsect2" lang="en"> <a name="id2587884"></a><h3>Element Information</h3> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term">plugin</span></td> <td> <a href="gst-plugins-base-plugins-plugin-audiotestsrc.html#plugin-audiotestsrc">audiotestsrc</a> </td> </tr> <tr> <td><span class="term">author</span></td> <td>Stefan Kost <ensonic@users.sf.net></td> </tr> <tr> <td><span class="term">class</span></td> <td>Source/Audio</td> </tr> </tbody> </table></div> <h3>Element Pads</h3> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term">name</span></td> <td>src</td> </tr> <tr> <td><span class="term">direction</span></td> <td>source</td> </tr> <tr> <td><span class="term">presence</span></td> <td>always</td> </tr> <tr> <td><span class="term">details</span></td> <td>audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)1; audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1; audio/x-raw-float, endianness=(int)1234, width=(int){ 32, 64 }, rate=(int)[ 1, 2147483647 ], channels=(int)1</td> </tr> </tbody> </table></div> </div> <p> </p> </div> <div class="refsect1" lang="en"> <a name="id2558674"></a><h2>Details</h2> <div class="refsect2" lang="en"> <a name="id2558685"></a><h3> <a name="GstAudioTestSrc-struct"></a>GstAudioTestSrc</h3> <a class="indexterm" name="id2558697"></a><pre class="programlisting">typedef struct _GstAudioTestSrc GstAudioTestSrc;</pre> <p> audiotestsrc object structure.</p> <p> </p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2558717"></a><h3> <a name="GstAudioTestSrcWave"></a>enum GstAudioTestSrcWave</h3> <a class="indexterm" name="id2558729"></a><pre class="programlisting">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; </pre> <p> Different types of supported sound waves.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-SINE:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SINE</code></span></td> <td> a sine wave </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-SQUARE:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SQUARE</code></span></td> <td> a square wave </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-SAW:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SAW</code></span></td> <td> a saw wave </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-TRIANGLE:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_TRIANGLE</code></span></td> <td> a tringle wave </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-SILENCE:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SILENCE</code></span></td> <td> silence </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-WHITE-NOISE:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE</code></span></td> <td> white noise </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-PINK-NOISE:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE</code></span></td> <td> pink noise </td> </tr> <tr> <td><span class="term"><a name="GST-AUDIO-TEST-SRC-WAVE-SINE-TAB:CAPS"></a><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SINE_TAB</code></span></td> <td> sine wave using a table </td> </tr> </tbody> </table></div> </div> </div> <div class="refsect1" lang="en"> <a name="id2562225"></a><h2>Property Details</h2> <div class="refsect2" lang="en"> <a name="id2562235"></a><h3> <a name="GstAudioTestSrc--freq"></a>The "<code class="literal">freq</code>" property</h3> <a class="indexterm" name="id2562249"></a><pre class="programlisting"> "freq" gdouble : Read / Write</pre> <p>Frequency of test signal.</p> <p>Allowed values: [0,20000]</p> <p>Default value: 440</p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2562278"></a><h3> <a name="GstAudioTestSrc--is-live"></a>The "<code class="literal">is-live</code>" property</h3> <a class="indexterm" name="id2562292"></a><pre class="programlisting"> "is-live" gboolean : Read / Write</pre> <p>Whether to act as a live source.</p> <p>Default value: FALSE</p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2562318"></a><h3> <a name="GstAudioTestSrc--samplesperbuffer"></a>The "<code class="literal">samplesperbuffer</code>" property</h3> <a class="indexterm" name="id2562334"></a><pre class="programlisting"> "samplesperbuffer" gint : Read / Write</pre> <p>Number of samples in each outgoing buffer.</p> <p>Allowed values: >= 1</p> <p>Default value: 1024</p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2562363"></a><h3> <a name="GstAudioTestSrc--timestamp-offset"></a>The "<code class="literal">timestamp-offset</code>" property</h3> <a class="indexterm" name="id2562379"></a><pre class="programlisting"> "timestamp-offset" gint64 : Read / Write</pre> <p>An offset added to timestamps set on buffers (in ns).</p> <p>Default value: 0</p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2562406"></a><h3> <a name="GstAudioTestSrc--volume"></a>The "<code class="literal">volume</code>" property</h3> <a class="indexterm" name="id2562420"></a><pre class="programlisting"> "volume" gdouble : Read / Write</pre> <p>Volume of test signal.</p> <p>Allowed values: [0,1]</p> <p>Default value: 0.8</p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2601240"></a><h3> <a name="GstAudioTestSrc--wave"></a>The "<code class="literal">wave</code>" property</h3> <a class="indexterm" name="id2601252"></a><pre class="programlisting"> "wave" <a href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave">GstAudioTestSrcWave</a> : Read / Write</pre> <p>Oscillator waveform.</p> <p>Default value: Sine</p> </div> </div> </div> </body> </html>