1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>audiotestsrc</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9 <link rel="prev" href="gst-plugins-base-plugins-audioresample.html" title="audioresample">
10 <link rel="next" href="gst-plugins-base-plugins-cdparanoiasrc.html" title="cdparanoiasrc">
11 <meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <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>
18 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Plugins Reference Manual</th>
21 <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>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-plugins-audiotestsrc.synopsis" class="shortcut">Top</a>
26 <a href="#gst-plugins-base-plugins-audiotestsrc.description" class="shortcut">Description</a>
28 <a href="#gst-plugins-base-plugins-audiotestsrc.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#gst-plugins-base-plugins-audiotestsrc.properties" class="shortcut">Properties</a>
33 <div class="refentry">
34 <a name="gst-plugins-base-plugins-audiotestsrc"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
37 <h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-audiotestsrc.top_of_page"></a>audiotestsrc</span></h2>
38 <p>audiotestsrc — Creates audio test signals of given frequency and volume</p>
40 <td valign="top" align="right"></td>
42 <div class="refsynopsisdiv">
43 <a name="gst-plugins-base-plugins-audiotestsrc.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstAudioTestSrc"></a><pre class="synopsis">struct <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc-struct" title="struct GstAudioTestSrc">GstAudioTestSrc</a>;
45 enum <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave" title="enum GstAudioTestSrcWave">GstAudioTestSrcWave</a>;
48 <div class="refsect1">
49 <a name="gst-plugins-base-plugins-audiotestsrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
50 <pre class="synopsis">
51 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
52 +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
53 +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
54 +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSrc.html">GstBaseSrc</a>
58 <div class="refsect1">
59 <a name="gst-plugins-base-plugins-audiotestsrc.properties"></a><h2>Properties</h2>
60 <pre class="synopsis">
61 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--freq" title='The "freq" property'>freq</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write
62 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--is-live" title='The "is-live" property'>is-live</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
63 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--samplesperbuffer" title='The "samplesperbuffer" property'>samplesperbuffer</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> : Read / Write
64 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--timestamp-offset" title='The "timestamp-offset" property'>timestamp-offset</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> : Read / Write
65 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--volume" title='The "volume" property'>volume</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write
66 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--wave" title='The "wave" property'>wave</a>" <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave" title="enum GstAudioTestSrcWave"><span class="type">GstAudioTestSrcWave</span></a> : Read / Write
67 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--can-activate-pull" title='The "can-activate-pull" property'>can-activate-pull</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
68 "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--can-activate-push" title='The "can-activate-push" property'>can-activate-push</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
71 <div class="refsect1">
72 <a name="gst-plugins-base-plugins-audiotestsrc.description"></a><h2>Description</h2>
74 AudioTestSrc can be used to generate basic audio signals. It support several
75 different waveforms and allows to set the base frequency and volume.
79 <div class="refsect2">
80 <a name="idp10290800"></a><h3>Example launch line</h3>
81 <div class="informalexample">
82 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
85 <td class="listing_lines" align="right"><pre>1</pre></td>
86 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td>
91 This pipeline produces a sine with default frequency, 440 Hz, and the
92 default volume, 0.8 (relative to a maximum 1.0).
93 <div class="informalexample">
94 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
97 <td class="listing_lines" align="right"><pre>1</pre></td>
98 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc wave<span class="gtkdoc opt">=</span><span class="number">2</span> freq<span class="gtkdoc opt">=</span><span class="number">200</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> tee name<span class="gtkdoc opt">=</span>t <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> alsasink t<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> libvisual_lv_scope <span class="gtkdoc opt">!</span> ffmpegcolorspace <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
103 In this example a saw wave is generated. The wave is shown using a
104 scope visualizer from libvisual, allowing you to visually verify that
105 the saw wave is correct.
109 <div class="refsynopsisdiv">
111 <div class="refsect2">
112 <a name="idp10294688"></a><h3>Element Information</h3>
113 <div class="variablelist"><table border="0">
114 <col align="left" valign="top">
117 <td><p><span class="term">plugin</span></p></td>
119 <a class="link" href="gst-plugins-base-plugins-plugin-audiotestsrc.html#plugin-audiotestsrc">audiotestsrc</a>
123 <td><p><span class="term">author</span></p></td>
124 <td>Stefan Kost <ensonic@users.sf.net></td>
127 <td><p><span class="term">class</span></p></td>
128 <td>Source/Audio</td>
134 <div class="refsect2">
135 <a name="idp10302144"></a><h3>Element Pads</h3>
136 <div class="variablelist"><table border="0">
137 <col align="left" valign="top">
140 <td><p><span class="term">name</span></p></td>
144 <td><p><span class="term">direction</span></p></td>
148 <td><p><span class="term">presence</span></p></td>
152 <td><p><span class="term">details</span></p></td>
153 <td>audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</td>
156 <td><p><span class="term"></span></p></td>
157 <td> audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</td>
160 <td><p><span class="term"></span></p></td>
161 <td> audio/x-raw-float, endianness=(int)1234, width=(int){ 32, 64 }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</td>
170 <div class="refsect1">
171 <a name="gst-plugins-base-plugins-audiotestsrc.details"></a><h2>Details</h2>
172 <div class="refsect2">
173 <a name="GstAudioTestSrc-struct"></a><h3>struct GstAudioTestSrc</h3>
174 <pre class="programlisting">struct GstAudioTestSrc;</pre>
176 audiotestsrc object structure.
180 <div class="refsect2">
181 <a name="GstAudioTestSrcWave"></a><h3>enum GstAudioTestSrcWave</h3>
182 <pre class="programlisting">typedef enum {
183 GST_AUDIO_TEST_SRC_WAVE_SINE,
184 GST_AUDIO_TEST_SRC_WAVE_SQUARE,
185 GST_AUDIO_TEST_SRC_WAVE_SAW,
186 GST_AUDIO_TEST_SRC_WAVE_TRIANGLE,
187 GST_AUDIO_TEST_SRC_WAVE_SILENCE,
188 GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE,
189 GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE,
190 GST_AUDIO_TEST_SRC_WAVE_SINE_TAB,
191 GST_AUDIO_TEST_SRC_WAVE_TICKS,
192 GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE
193 } GstAudioTestSrcWave;
196 Different types of supported sound waves.
198 <div class="variablelist"><table border="0">
199 <col align="left" valign="top">
202 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SINE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SINE</code></span></p></td>
207 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SQUARE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SQUARE</code></span></p></td>
212 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SAW:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SAW</code></span></p></td>
217 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-TRIANGLE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_TRIANGLE</code></span></p></td>
222 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SILENCE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SILENCE</code></span></p></td>
227 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-WHITE-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE</code></span></p></td>
228 <td>white uniform noise
232 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-PINK-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE</code></span></p></td>
237 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SINE-TAB:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SINE_TAB</code></span></p></td>
238 <td>sine wave using a table
242 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-TICKS:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_TICKS</code></span></p></td>
247 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-GAUSSIAN-WHITE-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE</code></span></p></td>
248 <td>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.
255 <div class="refsect1">
256 <a name="gst-plugins-base-plugins-audiotestsrc.property-details"></a><h2>Property Details</h2>
257 <div class="refsect2">
258 <a name="GstAudioTestSrc--freq"></a><h3>The <code class="literal">"freq"</code> property</h3>
259 <pre class="programlisting"> "freq" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write</pre>
260 <p>Frequency of test signal.</p>
261 <p>Allowed values: [0,20000]</p>
262 <p>Default value: 440</p>
265 <div class="refsect2">
266 <a name="GstAudioTestSrc--is-live"></a><h3>The <code class="literal">"is-live"</code> property</h3>
267 <pre class="programlisting"> "is-live" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
268 <p>Whether to act as a live source.</p>
269 <p>Default value: FALSE</p>
272 <div class="refsect2">
273 <a name="GstAudioTestSrc--samplesperbuffer"></a><h3>The <code class="literal">"samplesperbuffer"</code> property</h3>
274 <pre class="programlisting"> "samplesperbuffer" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> : Read / Write</pre>
275 <p>Number of samples in each outgoing buffer.</p>
276 <p>Allowed values: >= 1</p>
277 <p>Default value: 1024</p>
280 <div class="refsect2">
281 <a name="GstAudioTestSrc--timestamp-offset"></a><h3>The <code class="literal">"timestamp-offset"</code> property</h3>
282 <pre class="programlisting"> "timestamp-offset" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> : Read / Write</pre>
283 <p>An offset added to timestamps set on buffers (in ns).</p>
284 <p>Default value: 0</p>
287 <div class="refsect2">
288 <a name="GstAudioTestSrc--volume"></a><h3>The <code class="literal">"volume"</code> property</h3>
289 <pre class="programlisting"> "volume" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> : Read / Write</pre>
290 <p>Volume of test signal.</p>
291 <p>Allowed values: [0,1]</p>
292 <p>Default value: 0.8</p>
295 <div class="refsect2">
296 <a name="GstAudioTestSrc--wave"></a><h3>The <code class="literal">"wave"</code> property</h3>
297 <pre class="programlisting"> "wave" <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave" title="enum GstAudioTestSrcWave"><span class="type">GstAudioTestSrcWave</span></a> : Read / Write</pre>
298 <p>Oscillator waveform.</p>
299 <p>Default value: Sine</p>
302 <div class="refsect2">
303 <a name="GstAudioTestSrc--can-activate-pull"></a><h3>The <code class="literal">"can-activate-pull"</code> property</h3>
304 <pre class="programlisting"> "can-activate-pull" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
305 <p>Can activate in pull mode.</p>
306 <p>Default value: FALSE</p>
309 <div class="refsect2">
310 <a name="GstAudioTestSrc--can-activate-push"></a><h3>The <code class="literal">"can-activate-push"</code> property</h3>
311 <pre class="programlisting"> "can-activate-push" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
312 <p>Can activate in push mode.</p>
313 <p>Default value: TRUE</p>
319 Generated by GTK-Doc V1.17</div>