<class name="QSound" doc="/**
&lt;p&gt;The &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; class provides access to the platform audio facilities.&lt;/p&gt;
&lt;p&gt;Qt provides the most commonly required audio operation in GUI applications: asynchronously playing a sound file. This is most easily accomplished using the static &lt;a href=&quot;QSound.html#play(java.lang.String)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt; function:&lt;/p&gt;
&lt;pre&gt;    QSound::play(&amp;quot;mysounds/bells.wav&amp;quot;);&lt;/pre&gt;
&lt;p&gt;Alternatively, create a &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; object from the sound file first and then call the &lt;a href=&quot;QSound.html#play(java.lang.String)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt; slot:&lt;/p&gt;
&lt;pre&gt;    QSound bells(&amp;quot;mysounds/bells.wav&amp;quot;);
    bells.play();&lt;/pre&gt;
&lt;p&gt;Once created a &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; object can be queried for its &lt;a href=&quot;QSound.html#fileName()&quot;&gt;&lt;tt&gt;fileName&lt;/tt&gt;&lt;/a&gt; and total number of &lt;a href=&quot;QSound.html#loops()&quot;&gt;&lt;tt&gt;loops&lt;/tt&gt;&lt;/a&gt; (i.e&amp;#x2e; the number of times the sound will play). The number of repetitions can be altered using the &lt;a href=&quot;QSound.html#setLoops(int)&quot;&gt;&lt;tt&gt;setLoops&lt;/tt&gt;&lt;/a&gt; function. While playing the sound, the &lt;a href=&quot;QSound.html#loopsRemaining()&quot;&gt;&lt;tt&gt;loopsRemaining&lt;/tt&gt;&lt;/a&gt; function returns the remaining number of repetitions. Use the &lt;a href=&quot;QSound.html#isFinished()&quot;&gt;&lt;tt&gt;isFinished&lt;/tt&gt;&lt;/a&gt; function to determine whether the sound has finished playing.&lt;/p&gt;
&lt;p&gt;Sounds played using a &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; object may use more memory than the static &lt;a href=&quot;QSound.html#play(java.lang.String)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt; function, but it may also play more immediately (depending on the underlying platform audio facilities). Use the static &lt;a href=&quot;QSound.html#isAvailable()&quot;&gt;&lt;tt&gt;isAvailable&lt;/tt&gt;&lt;/a&gt; function to determine whether sound facilities exist on the platform. Which facilities that are actually used varies:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Platform&lt;/th&gt;&lt;th&gt;Audio Facility&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;Microsoft Windows&lt;/td&gt;&lt;td&gt;The underlying multimedia system is used; only WAVE format sound files are supported.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;X11&lt;/td&gt;&lt;td&gt;The &lt;a href=&quot;ftp://ftp.x.org/contrib/audio/nas/&quot;&gt;Network Audio System&lt;/tt&gt;&lt;/a&gt; is used if available, otherwise all operations work silently. NAS supports WAVE and AU files.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;Mac OS X&lt;/td&gt;&lt;td&gt;NSSound is used. All formats that NSSound supports, including QuickTime formats, are supported by Qt/Mac.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qtopia Core&lt;/td&gt;&lt;td&gt;A built-in mixing sound server is used, accessing &lt;tt&gt;/dev/dsp&lt;/tt&gt; directly. Only the WAVE format is supported.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;Note that &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; does not support &lt;a href=&quot;%2E%2E/resources.html&quot;&gt;resources&lt;/tt&gt;&lt;/a&gt;. This might be fixed in a future Qt version.&lt;/p&gt;
 */">
    <method name="public QSound(java.lang.String filename, com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; object from the file specified by the given &lt;tt&gt;filename&lt;/tt&gt; and with the given &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This may use more memory than the static &lt;a href=&quot;QSound.html#play(java.lang.String)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt; function, but it may also play more immediately (depending on the underlying platform audio facilities).&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#play(java.lang.String)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QSound(java.lang.String filename)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;filename&lt;/tt&gt;, 0). */"/>
    <method name="public final java.lang.String fileName()" doc="/**
&lt;p&gt;Returns the filename associated with this &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isFinished()" doc="/**
&lt;p&gt;Returns true if the sound has finished playing; otherwise returns false.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; On Windows this function always returns true for unlooped sounds.&lt;/p&gt;
 */"/>
    <method name="public final int loops()" doc="/**
&lt;p&gt;Returns the number of times the sound will play.&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#loopsRemaining()&quot;&gt;&lt;tt&gt;loopsRemaining&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSound.html#setLoops(int)&quot;&gt;&lt;tt&gt;setLoops&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int loopsRemaining()" doc="/**
&lt;p&gt;Returns the remaining number of times the sound will loop (this value decreases each time the sound is played).&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#loops()&quot;&gt;&lt;tt&gt;loops&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSound.html#isFinished()&quot;&gt;&lt;tt&gt;isFinished&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void play()" doc="/**
&lt;p&gt;Starts playing the sound specified by this &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
&lt;p&gt;The function returns immediately. Depending on the platform audio facilities, other sounds may stop or be mixed with the new sound. The sound can be played again at any time, possibly mixing or replacing previous plays of the sound.&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#fileName()&quot;&gt;&lt;tt&gt;fileName&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setLoops(int arg__1)" doc="/**
&lt;p&gt;Sets the sound to repeat the given &lt;tt&gt;arg__1&lt;/tt&gt; of times when it is played.&lt;/p&gt;
&lt;p&gt;Note that passing the value -1 will cause the sound to loop indefinitely.&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#loops()&quot;&gt;&lt;tt&gt;loops&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void stop()" doc="/**
&lt;p&gt;Stops the sound playing.&lt;/p&gt;
&lt;p&gt;Note that on Windows the current loop will finish if a sound is played in a loop.&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#play(java.lang.String)&quot;&gt;&lt;tt&gt;play&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static boolean isAvailable()" doc="/**
&lt;p&gt;Returns true if sound facilities exist on the platform; otherwise returns false.&lt;/p&gt;
&lt;p&gt;If no sound is available, all &lt;a href=&quot;QSound.html#QSound(java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSound&lt;/tt&gt;&lt;/a&gt; operations work silently and quickly. An application may choose either to notify the user if sound is crucial to the application or to operate silently without bothering the user.&lt;/p&gt;
&lt;p&gt;Note: On Windows this always returns true because some sound card drivers do not implement a way to find out whether it is available or not.&lt;/p&gt;
 */"/>
    <method name="public native static void play(java.lang.String filename)" doc="/**
&lt;p&gt;Plays the sound stored in the file specified by the given &lt;tt&gt;filename&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSound.html#stop()&quot;&gt;&lt;tt&gt;stop&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSound.html#loopsRemaining()&quot;&gt;&lt;tt&gt;loopsRemaining&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSound.html#isFinished()&quot;&gt;&lt;tt&gt;isFinished&lt;/tt&gt;&lt;/a&gt; */"/>
</class>
