[doc] misc. fix & improvements
[scilab.git] / scilab / modules / sound / help / en_US / playsnd.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4     * Copyright (C) ????-2006 - INRIA - Scilab
5     *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14     *
15     -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
18           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
19           xml:lang="en" xml:id="playsnd">
20     <refnamediv>
21         <refname>playsnd</refname>
22         <refpurpose>sound player facility</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Syntax</title>
26         <synopsis>
27           playsnd(y)
28           playsnd(y, rate, bits)
29           playsnd(y, rate, bits, command)
30         </synopsis>
31     </refsynopsisdiv>
32     <refsection>
33         <title>Arguments</title>
34         <variablelist>
35             <varlistentry>
36                 <term>y</term>
37                 <listitem>
38                     <para>A matrix. Each line describes a channel</para>
39                 </listitem>
40             </varlistentry>
41             <varlistentry>
42                 <term>rate</term>
43                 <listitem>
44                     <para>real number, sampling frequency (default value is 22050).</para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>bits</term>
49                 <listitem>
50                     <para>real number, number of bits (usually 8 or 16). Unused yet.</para>
51                 </listitem>
52             </varlistentry>
53             <varlistentry>
54                 <term>command</term>
55                 <listitem>
56                     <para>Only used on Unix systems it gives the name of the command to use for playing sound
57                         (wav) files. The default value is <literal>play</literal>. If set <literal>/dev/audio</literal> then
58                         a 8 bits mu-law raw sound file is created and send to <literal>/dev/audio</literal>
59                     </para>
60                 </listitem>
61             </varlistentry>
62         </variablelist>
63     </refsection>
64     <refsection>
65         <title>Description</title>
66         <para>Plays a multi channel signal given by a Scilab matrix were sound is sampled at rate given by
67             <literal>rate</literal>.
68         </para>
69     </refsection>
70     <refsection>
71         <title>Examples</title>
72         <programlisting role="example"><![CDATA[
73 // A two channel signal
74 y = loadwave("SCI/modules/sound/demos/chimes.wav");
75 playsnd(y)
76  ]]></programlisting>
77     </refsection>
78     <refsection role="see also">
79         <title>See also</title>
80         <simplelist type="inline">
81             <member>
82                 <link linkend="lin2mu">lin2mu</link>
83             </member>
84             <member>
85                 <link linkend="wavread">wavread</link>
86             </member>
87         </simplelist>
88     </refsection>
89 </refentry>