<refentry id="gnome-gnome-sound" revision="21 Mar 2000">
<refmeta>
<refentrytitle>gnome-sound</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gnome-sound</refname><refpurpose>Sound playing routines for GNOME applications</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gnome.h&gt;


void        <link linkend="gnome-sound-init">gnome_sound_init</link>                (const char *hostname);
void        <link linkend="gnome-sound-shutdown">gnome_sound_shutdown</link>            (void);
int         <link linkend="gnome-sound-sample-load">gnome_sound_sample_load</link>         (const char *sample_name,
                                             const char *filename);
void        <link linkend="gnome-sound-play">gnome_sound_play</link>                (const char *filename);
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>
These routines provide a simple way of playing sounds.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gnome-sound-init">gnome_sound_init ()</title>
<programlisting>void        gnome_sound_init                (const char *hostname);</programlisting>
<para>
Initialize esd connection</para>
<para>
This routine initializes the applications connection to the 
system's sound server.
</para>
<para>
The application can expect this to be automatically called if the
user has requested GNOME sound support.
</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>hostname</parameter>&nbsp;:</entry>
<entry> hostname where esd daemon resides.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-sound-shutdown">gnome_sound_shutdown ()</title>
<programlisting>void        gnome_sound_shutdown            (void);</programlisting>
<para>
shuts down the gnome sound support</para>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gnome-sound-sample-load">gnome_sound_sample_load ()</title>
<programlisting>int         gnome_sound_sample_load         (const char *sample_name,
                                             const char *filename);</programlisting>
<para>
Loads the audio on <parameter>filename</parameter> and XXXX</para>
<para>
Loads a sound file into esound sample with the given name. Returns the
esound numeric ID of the sample.
</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>sample_name</parameter>&nbsp;:</entry>
<entry> the name of the sample
</entry></row>
<row><entry align="right"><parameter>filename</parameter>&nbsp;:</entry>
<entry> the filename where the audio is stored
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a sample_id, or a negative number otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-sound-play">gnome_sound_play ()</title>
<programlisting>void        gnome_sound_play                (const char *filename);</programlisting>
<para>
Plays the audio stored in <parameter>filename</parameter></para>
<para>
Convenience routine to play a sound file. Fire and forget.
</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>filename</parameter>&nbsp;:</entry>
<entry> file containing the sound sample
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
